class Aqueductron::CompoundResult

Public Class Methods

new(paths) click to toggle source
# File lib/aqueductron/compound_result.rb, line 4
def initialize(paths)
  @contents = paths
end

Public Instance Methods

draw() click to toggle source
# File lib/aqueductron/compound_result.rb, line 23
def draw
  paths = Drawing.draw_multiple_paths(@contents)
  Drawing.horizontal_concat(Drawing.joint_prefix, paths)
end
keys() click to toggle source
# File lib/aqueductron/compound_result.rb, line 8
def keys
  @contents.keys
end
to_hash() click to toggle source
# File lib/aqueductron/compound_result.rb, line 19
def to_hash
  @contents.map_values {|a| a.to_hash}
end
value(*path) click to toggle source
# File lib/aqueductron/compound_result.rb, line 12
def value(*path)
  return self if path.empty?
  (head, *tail) = path
  puts "Nothing found at #{head}" unless @contents[head]
  @contents[head].value(*tail)
end