Class: TrieNode

Inherits:
Object
  • Object
show all
Defined in:
lib/jtrie.rb

Overview

require_relative ‘csv_write’

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#childrenObject

Returns the value of attribute children.



4
5
6
# File 'lib/jtrie.rb', line 4

def children
  @children
end

#is_endObject

Returns the value of attribute is_end.



4
5
6
# File 'lib/jtrie.rb', line 4

def is_end
  @is_end
end