Class: Zadt::DoublyLinkedListNode
- Inherits:
-
Object
- Object
- Zadt::DoublyLinkedListNode
- Defined in:
- lib/zadt/AbstractDataTypes/LinkedList/DoublyLinkedList.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.
Class Method Summary collapse
Instance Method Summary collapse
- #help ⇒ Object
-
#initialize(val = nil, next_ = nil) ⇒ DoublyLinkedListNode
constructor
A new instance of DoublyLinkedListNode.
Constructor Details
#initialize(val = nil, next_ = nil) ⇒ DoublyLinkedListNode
Returns a new instance of DoublyLinkedListNode.
5 6 7 8 9 10 11 12 13 |
# File 'lib/zadt/AbstractDataTypes/LinkedList/DoublyLinkedList.rb', line 5 def initialize(val = nil, next_ = nil) @val = val if !next_ @next = next_ else self.next = next_ end @prev = nil end |
Instance Attribute Details
#next ⇒ Object
Returns the value of attribute next.
4 5 6 |
# File 'lib/zadt/AbstractDataTypes/LinkedList/DoublyLinkedList.rb', line 4 def next @next end |
#prev ⇒ Object
Returns the value of attribute prev.
4 5 6 |
# File 'lib/zadt/AbstractDataTypes/LinkedList/DoublyLinkedList.rb', line 4 def prev @prev end |
#val ⇒ Object
Returns the value of attribute val.
3 4 5 |
# File 'lib/zadt/AbstractDataTypes/LinkedList/DoublyLinkedList.rb', line 3 def val @val end |
Class Method Details
.help ⇒ Object
29 30 31 |
# File 'lib/zadt/AbstractDataTypes/LinkedList/DoublyLinkedList.rb', line 29 def self.help LinkedListNode. end |
Instance Method Details
#help ⇒ Object
25 26 27 |
# File 'lib/zadt/AbstractDataTypes/LinkedList/DoublyLinkedList.rb', line 25 def help LinkedListNode.help end |