Class: MarkovTextGenerator::Api::Utils::DataStructures::LinkedList::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/markov_text_generator/api/utils/data_structures/linked_list/node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dataObject (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

#predObject

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

#succObject

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