Class: DoublyLinkedListNode
- Inherits:
-
Object
- Object
- DoublyLinkedListNode
- Defined in:
- lib/collection_framework/doubly_linked_list/node.rb
Instance Attribute Summary collapse
-
#next ⇒ Object
Returns the value of attribute next.
-
#prev ⇒ Object
Returns the value of attribute prev.
-
#val ⇒ Object
Returns the value of attribute val.
Instance Method Summary collapse
-
#initialize(val, _next, _prev) ⇒ DoublyLinkedListNode
constructor
A new instance of DoublyLinkedListNode.
Constructor Details
#initialize(val, _next, _prev) ⇒ DoublyLinkedListNode
Returns a new instance of DoublyLinkedListNode.
6 7 8 9 10 |
# File 'lib/collection_framework/doubly_linked_list/node.rb', line 6 def initialize(val, _next, _prev) @val = val @next = _next @prev = _prev end |
Instance Attribute Details
#next ⇒ Object
Returns the value of attribute next.
4 5 6 |
# File 'lib/collection_framework/doubly_linked_list/node.rb', line 4 def next @next end |
#prev ⇒ Object
Returns the value of attribute prev.
4 5 6 |
# File 'lib/collection_framework/doubly_linked_list/node.rb', line 4 def prev @prev end |
#val ⇒ Object
Returns the value of attribute val.
4 5 6 |
# File 'lib/collection_framework/doubly_linked_list/node.rb', line 4 def val @val end |