Class: MarkovTextGenerator::Api::Utils::DataStructures::LinkedList::Node
- Inherits:
-
Object
- Object
- MarkovTextGenerator::Api::Utils::DataStructures::LinkedList::Node
- Defined in:
- lib/markov_text_generator/api/utils/data_structures/linked_list/node.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.
10 11 12 13 14 |
# File 'lib/markov_text_generator/api/utils/data_structures/linked_list/node.rb', line 10 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.
8 9 10 |
# File 'lib/markov_text_generator/api/utils/data_structures/linked_list/node.rb', line 8 def data @data end |
#pred ⇒ Object
Returns the value of attribute pred.
7 8 9 |
# File 'lib/markov_text_generator/api/utils/data_structures/linked_list/node.rb', line 7 def pred @pred end |
#succ ⇒ Object
Returns the value of attribute succ.
7 8 9 |
# File 'lib/markov_text_generator/api/utils/data_structures/linked_list/node.rb', line 7 def succ @succ end |