Sha256: cd934070f749858fe4b87815028a2e9dc210b9dcb2c38b0b2db0cef2d43a7678
Contents?: true
Size: 506 Bytes
Versions: 3
Compression:
Stored size: 506 Bytes
Contents
module Jamnagar module Refiners class PopularityIncrementation < Refiner def initialize(incrementor=nil, store: nil) @incrementor = incrementor || Utilities::PopularityIncrementor.new(store) end def to_s "Popularity Incrementor" end def refine(item) super item end def refinement_result(item) @incrementor.increment(item["duplicate_of"]) if item["duplicate"] == true {"popularity" => 1} end end end end
Version data entries
3 entries across 3 versions & 1 rubygems