Class: GraphBuilder::Leaf
- Inherits:
-
Base
- Object
- Base
- GraphBuilder::Leaf
show all
- Defined in:
- lib/graph_builder.rb
Instance Attribute Summary collapse
Attributes inherited from Base
#children, #opts, #parent
Instance Method Summary
collapse
Methods inherited from Base
#ancestors, #debug, #depth, #dump, #indent, #process
Constructor Details
#initialize(parent, thing) ⇒ Leaf
Returns a new instance of Leaf.
54
55
56
57
|
# File 'lib/graph_builder.rb', line 54
def initialize parent, thing
@thing = thing
super parent
end
|
Instance Attribute Details
#thing ⇒ Object
Returns the value of attribute thing.
53
54
55
|
# File 'lib/graph_builder.rb', line 53
def thing
@thing
end
|
Instance Method Details
#empty? ⇒ Boolean
59
|
# File 'lib/graph_builder.rb', line 59
def empty?; false; end
|
#first_things ⇒ Object
61
|
# File 'lib/graph_builder.rb', line 61
def first_things; thing; end
|
#last_things ⇒ Object
60
|
# File 'lib/graph_builder.rb', line 60
def last_things; thing; end
|
#to_s ⇒ Object
62
|
# File 'lib/graph_builder.rb', line 62
def to_s; "[#{thing}]"; end
|