Class: LinkNode
- Inherits:
-
Object
- Object
- LinkNode
- Defined in:
- lib/algorithm_selector.rb
Overview
Node helper class for Linked List
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 = nil) ⇒ LinkNode
constructor
A new instance of LinkNode.
Constructor Details
#initialize(val = nil) ⇒ LinkNode
Returns a new instance of LinkNode.
573 574 575 576 577 |
# File 'lib/algorithm_selector.rb', line 573 def initialize(val=nil) @val = val @next = nil @prev = nil end |
Instance Attribute Details
#next ⇒ Object
Returns the value of attribute next.
572 573 574 |
# File 'lib/algorithm_selector.rb', line 572 def next @next end |
#prev ⇒ Object
Returns the value of attribute prev.
572 573 574 |
# File 'lib/algorithm_selector.rb', line 572 def prev @prev end |
#val ⇒ Object
Returns the value of attribute val.
572 573 574 |
# File 'lib/algorithm_selector.rb', line 572 def val @val end |