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