Sha256: af09dd93e09ac72a70e833ff8923f23e757c9a4de5841102a40a9e1a4f2634b0

Contents?: true

Size: 195 Bytes

Versions: 8

Compression:

Stored size: 195 Bytes

Contents

module Lunar
  class Scoring
    def initialize(words)
      @words = Words.new(words)
    end

    def scores
      @words.inject(Hash.new(0)) { |a, w| a[w.downcase] += 1; a }
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
lunar-0.4.1 lib/lunar/scoring.rb
lunar-0.4.0 lib/lunar/scoring.rb
lunar-0.3.0 lib/lunar/scoring.rb
lunar-0.2.3 lib/lunar/scoring.rb
lunar-0.2.2 lib/lunar/scoring.rb
lunar-0.2.1 lib/lunar/scoring.rb
lunar-0.2.0 lib/lunar/scoring.rb
lunar-0.1.1 lib/lunar/scoring.rb