Sha256: bd33bfa4c637c53db2b6ea519c2dad4f57e0efdac0f87579e638a4e59db5bed1
Contents?: true
Size: 831 Bytes
Versions: 2
Compression:
Stored size: 831 Bytes
Contents
require "word_scramble/version" ####################### # # Word Scramble # # A game played in the Virgin Airlines waiting lounge. # # Input is a scrambled string. # You try to make a word (or words) from those letters. # # ===== Examples # "valesages" => "las vegas" # "realapin" => "airplane" # "liopt" => "pilot" # # ==== Usage # # descrambler = WordScramble::Descrambler.new("realapin") # descrambler.matching_words # => ["airplane", ... ] module WordScramble DICTIONARY_PATH = '/etc/dictionaries-common/words' DICTIONARY = File.open(DICTIONARY_PATH) do |f| dictionary = [] f.each_line do |line| dictionary.push(line.strip) end dictionary end end require File.expand_path('../word_scramble/scrambled_word', __FILE__) require File.expand_path('../word_scramble/descrambler', __FILE__)
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
word_scramble-0.0.2 | lib/word_scramble.rb |
word_scramble-0.0.1 | lib/word_scramble.rb |