Basic ruby implementation of a Trie.