Class: DoublyLinkedListNode

Inherits:
Object
  • Object
show all
Defined in:
lib/collection_framework/doubly_linked_list/node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nextObject

Returns the value of attribute next.



4
5
6
# File 'lib/collection_framework/doubly_linked_list/node.rb', line 4

def next
  @next
end

#prevObject

Returns the value of attribute prev.



4
5
6
# File 'lib/collection_framework/doubly_linked_list/node.rb', line 4

def prev
  @prev
end

#valObject

Returns the value of attribute val.



4
5
6
# File 'lib/collection_framework/doubly_linked_list/node.rb', line 4

def val
  @val
end