Class: Node
- Inherits:
-
Struct
- Object
- Struct
- Node
- Defined in:
- lib/node/node.rb,
lib/node/node.rb
Instance Attribute Summary collapse
-
#father ⇒ Object
Returns the value of attribute father.
-
#next ⇒ Object
Returns the value of attribute next.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#father ⇒ Object
Returns the value of attribute father
1 2 3 |
# File 'lib/node/node.rb', line 1 def father @father end |
#next ⇒ Object
Returns the value of attribute next
1 2 3 |
# File 'lib/node/node.rb', line 1 def next @next end |
#value ⇒ Object
Returns the value of attribute value
1 2 3 |
# File 'lib/node/node.rb', line 1 def value @value end |
Instance Method Details
#reverse {|_self| ... } ⇒ Object
3 4 5 6 7 8 |
# File 'lib/node/node.rb', line 3 def reverse(&block) if self.next != nil self.next.reverse(&block) end yield self end |