clayton/consummo

View on GitHub
lib/consummo/enrichers/word_count_enricher.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Consummo
  class WordCountEnricher
    def enrich(item)
      wc = item.content.scan(/[[:alpha:]]+/).count
      {:word_count => wc}
    end
  end
end