Class: Algorithms::Containers::Trie::Node
- Inherits:
-
Object
- Object
- Algorithms::Containers::Trie::Node
- Defined in:
- lib/containers/trie.rb
Overview
:nodoc: all
Instance Attribute Summary collapse
-
#char ⇒ Object
Returns the value of attribute char.
-
#end ⇒ Object
Returns the value of attribute end.
-
#left ⇒ Object
Returns the value of attribute left.
-
#mid ⇒ Object
Returns the value of attribute mid.
-
#right ⇒ Object
Returns the value of attribute right.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(char, value) ⇒ Node
constructor
A new instance of Node.
- #last? ⇒ Boolean
Constructor Details
#initialize(char, value) ⇒ Node
Returns a new instance of Node.
111 112 113 114 115 116 |
# File 'lib/containers/trie.rb', line 111 def initialize(char, value) @char = char @value = value @left = @mid = @right = nil @end = false end |
Instance Attribute Details
#char ⇒ Object
Returns the value of attribute char.
109 110 111 |
# File 'lib/containers/trie.rb', line 109 def char @char end |
#end ⇒ Object
Returns the value of attribute end.
109 110 111 |
# File 'lib/containers/trie.rb', line 109 def end @end end |
#left ⇒ Object
Returns the value of attribute left.
109 110 111 |
# File 'lib/containers/trie.rb', line 109 def left @left end |
#mid ⇒ Object
Returns the value of attribute mid.
109 110 111 |
# File 'lib/containers/trie.rb', line 109 def mid @mid end |
#right ⇒ Object
Returns the value of attribute right.
109 110 111 |
# File 'lib/containers/trie.rb', line 109 def right @right end |
#value ⇒ Object
Returns the value of attribute value.
109 110 111 |
# File 'lib/containers/trie.rb', line 109 def value @value end |
Instance Method Details
#last? ⇒ Boolean
118 119 120 |
# File 'lib/containers/trie.rb', line 118 def last? @end == true end |