Class: BasicQueue::Node
- Inherits:
-
Object
- Object
- BasicQueue::Node
- Defined in:
- lib/basic_queue.rb
Overview
Instance Attribute Summary collapse
-
#item ⇒ Object
readonly
Returns the value of attribute item.
-
#next_node ⇒ Object
Returns the value of attribute next_node.
Instance Method Summary collapse
-
#initialize(item, next_node) ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize(item, next_node) ⇒ Node
Returns a new instance of Node.
124 125 126 127 |
# File 'lib/basic_queue.rb', line 124 def initialize(item, next_node) @item = item @next_node = next_node end |
Instance Attribute Details
#item ⇒ Object (readonly)
Returns the value of attribute item.
121 122 123 |
# File 'lib/basic_queue.rb', line 121 def item @item end |
#next_node ⇒ Object
Returns the value of attribute next_node.
122 123 124 |
# File 'lib/basic_queue.rb', line 122 def next_node @next_node end |