Class: Algorithmable::DataStructs::LinkedList::Node
- Inherits:
-
Object
- Object
- Algorithmable::DataStructs::LinkedList::Node
- Defined in:
- lib/algorithmable/data_structs/linked_list.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#pred ⇒ Object
Returns the value of attribute pred.
-
#succ ⇒ Object
Returns the value of attribute succ.
Instance Method Summary collapse
-
#initialize(data, pred = nil, succ = nil) ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize(data, pred = nil, succ = nil) ⇒ Node
Returns a new instance of Node.
92 93 94 95 96 |
# File 'lib/algorithmable/data_structs/linked_list.rb', line 92 def initialize(data, pred = nil, succ = nil) @data = data @pred = pred @succ = succ end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
90 91 92 |
# File 'lib/algorithmable/data_structs/linked_list.rb', line 90 def data @data end |
#pred ⇒ Object
Returns the value of attribute pred.
89 90 91 |
# File 'lib/algorithmable/data_structs/linked_list.rb', line 89 def pred @pred end |
#succ ⇒ Object
Returns the value of attribute succ.
89 90 91 |
# File 'lib/algorithmable/data_structs/linked_list.rb', line 89 def succ @succ end |