Class: Node
Instance Attribute Summary collapse
-
#next ⇒ Object
Returns the value of attribute next.
-
#prev ⇒ Object
Returns the value of attribute prev.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#next ⇒ Object
Returns the value of attribute next
6 7 8 |
# File 'lib/DobLinkedList.rb', line 6 def next @next end |
#prev ⇒ Object
Returns the value of attribute prev
6 7 8 |
# File 'lib/DobLinkedList.rb', line 6 def prev @prev end |
#value ⇒ Object
Returns the value of attribute value
6 7 8 |
# File 'lib/DobLinkedList.rb', line 6 def value @value end |
Instance Method Details
#<=>(other) ⇒ Object
9 10 11 12 13 |
# File 'lib/DobLinkedList.rb', line 9 def <=>(other) return nil unless other.instance_of?Node value <=> other.value end |
#to_s ⇒ Object
15 16 17 |
# File 'lib/DobLinkedList.rb', line 15 def to_s "[ |#{value}| ]" end |