class Consummo::ReadabilityEnricher

Public Class Methods

new(scorer: ContentScorer.new) click to toggle source
# File lib/consummo/enrichers/readability_enricher.rb, line 5
def initialize(scorer: ContentScorer.new)
  @scorer = scorer
end

Public Instance Methods

enrich(item) click to toggle source
# File lib/consummo/enrichers/readability_enricher.rb, line 9
def enrich(item)
  score = @scorer.score(item.content)
  {:readability_score => score}
end