class TwitterCldr::Utils::FileSystemTrie::Node
Attributes
children[RW]
value[RW]
Public Class Methods
new(value = nil, children = {})
click to toggle source
# File lib/twitter_cldr/utils/file_system_trie.rb, line 112 def initialize(value = nil, children = {}) @value = value @children = children end
Public Instance Methods
child(key)
click to toggle source
# File lib/twitter_cldr/utils/file_system_trie.rb, line 117 def child(key) @children[key] end
each_key_and_child(&block)
click to toggle source
# File lib/twitter_cldr/utils/file_system_trie.rb, line 129 def each_key_and_child(&block) @children.each(&block) end
has_children?()
click to toggle source
# File lib/twitter_cldr/utils/file_system_trie.rb, line 125 def has_children? !@children.empty? end
keys()
click to toggle source
# File lib/twitter_cldr/utils/file_system_trie.rb, line 133 def keys @children.keys end
set_child(key, child)
click to toggle source
# File lib/twitter_cldr/utils/file_system_trie.rb, line 121 def set_child(key, child) @children[key] = child end
to_trie()
click to toggle source
# File lib/twitter_cldr/utils/file_system_trie.rb, line 137 def to_trie Trie.new(self.class.new(nil, @children)).lock end