Class: Node
- Inherits:
-
Object
- Object
- Node
- Defined in:
- lib/node.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#next_node ⇒ Object
Returns the value of attribute next_node.
Instance Method Summary collapse
-
#initialize(data) ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize(data) ⇒ Node
Returns a new instance of Node.
4 5 6 7 |
# File 'lib/node.rb', line 4 def initialize(data) @data = data @next_node = nil end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
2 3 4 |
# File 'lib/node.rb', line 2 def data @data end |
#next_node ⇒ Object
Returns the value of attribute next_node.
2 3 4 |
# File 'lib/node.rb', line 2 def next_node @next_node end |