# File lib/randexp/dictionary.rb, line 20 def self.words_by_length @@words_by_length ||= begin hash = Hash.new {|h,k| h[k] = [] } words.inject(hash) {|h, w| h[w.size] << w; h } end end