Class: LinkNode

Inherits:
Object
  • Object
show all
Defined in:
lib/algorithm_selector.rb

Overview

Node helper class for Linked List

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nextObject

Returns the value of attribute next.



572
573
574
# File 'lib/algorithm_selector.rb', line 572

def next
  @next
end

#prevObject

Returns the value of attribute prev.



572
573
574
# File 'lib/algorithm_selector.rb', line 572

def prev
  @prev
end

#valObject

Returns the value of attribute val.



572
573
574
# File 'lib/algorithm_selector.rb', line 572

def val
  @val
end