Class: Komainu::TrieNode
- Inherits:
-
Object
- Object
- Komainu::TrieNode
- Defined in:
- lib/komainu/trie_node.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#word ⇒ Object
Returns the value of attribute word.
Instance Method Summary collapse
-
#initialize ⇒ TrieNode
constructor
A new instance of TrieNode.
- #insert(word) ⇒ Object
Constructor Details
#initialize ⇒ TrieNode
Returns a new instance of TrieNode.
5 6 7 |
# File 'lib/komainu/trie_node.rb', line 5 def initialize @children = {} end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children.
3 4 5 |
# File 'lib/komainu/trie_node.rb', line 3 def children @children end |
#word ⇒ Object
Returns the value of attribute word.
3 4 5 |
# File 'lib/komainu/trie_node.rb', line 3 def word @word end |