Class: Link
- Inherits:
-
Object
- Object
- Link
- Defined in:
- lib/doubly_linked_list.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.
Instance Method Summary collapse
-
#initialize(val) ⇒ Link
constructor
A new instance of Link.
Constructor Details
#initialize(val) ⇒ Link
Returns a new instance of Link.
60 61 62 63 64 |
# File 'lib/doubly_linked_list.rb', line 60 def initialize(val) @val = val @next = nil @prev = nil end |
Instance Attribute Details
#next ⇒ Object
Returns the value of attribute next.
58 59 60 |
# File 'lib/doubly_linked_list.rb', line 58 def next @next end |
#prev ⇒ Object
Returns the value of attribute prev.
58 59 60 |
# File 'lib/doubly_linked_list.rb', line 58 def prev @prev end |
#val ⇒ Object
Returns the value of attribute val.
58 59 60 |
# File 'lib/doubly_linked_list.rb', line 58 def val @val end |