Trie tree Implementation for Ruby