Class: StringMetric::Levenshtein::TrieNode
- Inherits:
-
Object
- Object
- StringMetric::Levenshtein::TrieNode
- Defined in:
- lib/string_metric/levenshtein/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.
8 9 10 11 |
# File 'lib/string_metric/levenshtein/trie_node.rb', line 8 def initialize @word = nil @children = {} end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children.
6 7 8 |
# File 'lib/string_metric/levenshtein/trie_node.rb', line 6 def children @children end |
#word ⇒ Object
Returns the value of attribute word.
6 7 8 |
# File 'lib/string_metric/levenshtein/trie_node.rb', line 6 def word @word end |