Class: Node

Inherits:
Object
  • Object
show all
Defined in:
lib/node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Node

Returns a new instance of Node.



7
8
9
10
11
12
# File 'lib/node.rb', line 7

def initialize(value)
  @value  = value
  @word = false
  @next = []

end

Instance Attribute Details

#nextObject

Returns the value of attribute next.



5
6
7
# File 'lib/node.rb', line 5

def next
  @next
end

#valueObject

Returns the value of attribute value.



5
6
7
# File 'lib/node.rb', line 5

def value
  @value
end

#wordObject

Returns the value of attribute word.



5
6
7
# File 'lib/node.rb', line 5

def word
  @word
end