Class: GraphBuilder::Node
- Inherits:
-
Base
- Object
- Base
- GraphBuilder::Node
show all
- Defined in:
- lib/graph_builder.rb
Instance Attribute Summary
Attributes inherited from Base
#children, #opts, #parent
Instance Method Summary
collapse
Methods inherited from Base
#ancestors, #debug, #depth, #dump, #empty?, #indent, #initialize, #process
Instance Method Details
#add_leaf(child) ⇒ Object
37
38
39
|
# File 'lib/graph_builder.rb', line 37
def add_leaf child
add_node Leaf.new(self,child)
end
|
#add_node(node) ⇒ Object
41
42
43
44
|
# File 'lib/graph_builder.rb', line 41
def add_node node
@children << node
node
end
|
#to_s ⇒ Object
46
47
48
|
# File 'lib/graph_builder.rb', line 46
def to_s
"[#{self.class.name.split('::').last},empty?=#{empty?},f=#{first_things},l=#{last_things}]"
end
|