Class: CircularLinkedList::Node
- Inherits:
-
Object
- Object
- CircularLinkedList::Node
- Defined in:
- lib/circular_linked_list.rb
Overview
Your code goes here…
Instance Attribute Summary collapse
-
#next_node ⇒ Object
Returns the value of attribute next_node.
-
#node_value ⇒ Object
Returns the value of attribute node_value.
-
#prev_node ⇒ Object
Returns the value of attribute prev_node.
Instance Method Summary collapse
-
#initialize(node_value) ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize(node_value) ⇒ Node
Returns a new instance of Node.
8 9 10 11 12 |
# File 'lib/circular_linked_list.rb', line 8 def initialize node_value @node_value = node_value @prev_node = self @next_node = self end |
Instance Attribute Details
#next_node ⇒ Object
Returns the value of attribute next_node.
6 7 8 |
# File 'lib/circular_linked_list.rb', line 6 def next_node @next_node end |
#node_value ⇒ Object
Returns the value of attribute node_value.
6 7 8 |
# File 'lib/circular_linked_list.rb', line 6 def node_value @node_value end |
#prev_node ⇒ Object
Returns the value of attribute prev_node.
6 7 8 |
# File 'lib/circular_linked_list.rb', line 6 def prev_node @prev_node end |