Class: TrieNode
- Inherits:
-
Object
- Object
- TrieNode
- Defined in:
- lib/jtrie.rb
Overview
require_relative ‘csv_write’
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#is_end ⇒ Object
Returns the value of attribute is_end.
Instance Method Summary collapse
-
#initialize(is_end = false) ⇒ TrieNode
constructor
A new instance of TrieNode.
Constructor Details
#initialize(is_end = false) ⇒ TrieNode
Returns a new instance of TrieNode.
6 7 8 9 |
# File 'lib/jtrie.rb', line 6 def initialize(is_end = false) @is_end = is_end @children = Array.new(26) end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children.
4 5 6 |
# File 'lib/jtrie.rb', line 4 def children @children end |
#is_end ⇒ Object
Returns the value of attribute is_end.
4 5 6 |
# File 'lib/jtrie.rb', line 4 def is_end @is_end end |