Method: Upwords::Dictionary#initialize
- Defined in:
- lib/upwords/dictionary.rb
#initialize(words = []) ⇒ Dictionary
Returns a new instance of Dictionary.
4 5 6 |
# File 'lib/upwords/dictionary.rb', line 4 def initialize(words = []) @legal_words = Set.new(words.map {|w| w.upcase}) end |