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.
56 57 58 59 60 |
# File 'lib/doubly_linked_list.rb', line 56 def initialize(val) @val = val @next = nil @prev = nil end |
Instance Attribute Details
#next ⇒ Object
Returns the value of attribute next.
54 55 56 |
# File 'lib/doubly_linked_list.rb', line 54 def next @next end |
#prev ⇒ Object
Returns the value of attribute prev.
54 55 56 |
# File 'lib/doubly_linked_list.rb', line 54 def prev @prev end |
#val ⇒ Object
Returns the value of attribute val.
54 55 56 |
# File 'lib/doubly_linked_list.rb', line 54 def val @val end |