Class: Containers::Trie::Node
- Inherits:
-
Object
- Object
- 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.
107 108 109 110 111 112 |
# File 'lib/containers/trie.rb', line 107 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.
105 106 107 |
# File 'lib/containers/trie.rb', line 105 def char @char end |
#end ⇒ Object
Returns the value of attribute end.
105 106 107 |
# File 'lib/containers/trie.rb', line 105 def end @end end |
#left ⇒ Object
Returns the value of attribute left.
105 106 107 |
# File 'lib/containers/trie.rb', line 105 def left @left end |
#mid ⇒ Object
Returns the value of attribute mid.
105 106 107 |
# File 'lib/containers/trie.rb', line 105 def mid @mid end |
#right ⇒ Object
Returns the value of attribute right.
105 106 107 |
# File 'lib/containers/trie.rb', line 105 def right @right end |
#value ⇒ Object
Returns the value of attribute value.
105 106 107 |
# File 'lib/containers/trie.rb', line 105 def value @value end |
Instance Method Details
#last? ⇒ Boolean
114 115 116 |
# File 'lib/containers/trie.rb', line 114 def last? @end == true end |