NYT Spelling Bee solver written in Ruby. It should work fine on any BSD/Linux/Unix system with Ruby installed.
In a terminal:
git clone git@gist.github.com:3488d03f298cef55289bc899e79e18a3.git spelling_bee
cd spelling_bee
irb -r ./spelling_bee.rb
In the irb session:
game = SpellingBee.new(must_contain: 'h', may_contain: 'acilot')
game.pangrams # ["catholic"]
game.words # ["achoo", "alcohol", "alcoholic", "aloha", "altho", ...]
If your operating system does not have a dictionary file located at '/usr/share/dict/words' this code will exit without producing a result. You can specify a custom dictionary file location by passing it in as a string:
# If your OS has a dictionary file located at: /opt/share/words
game = SpellingBee.new(dictionary: '/opt/share/words', must_contain: 'h', may_contain: 'acilot')