scottcreynolds/onewordsuggestion — pull request #1 by bpina (2014-02-02 00:09:41+00:00)
Title: Suggestion filestore refactor

These commits refactor the ruby string based suggestion engine for a load once hash of suggestion data.

Suggestion data are stored in text files in the app/data directory. The data file format is one line per suggestion. The suggestion text files are loaded into memory via an initializer and are stored in the constant SUGGESTTION_DATA.

The TextModel base class can be used to forward reads from the suggestion dictionary via a method_missing trap. e.g. Character.nouns will return SUGGESTION_DATA[:characters][:nouns]