Class: Siftly::Aggregators::Any

Inherits:
Object
  • Object
show all
Defined in:
lib/siftly/aggregators.rb

Instance Method Summary collapse

Instance Method Details

#call(filter_results:, threshold:, context:) ⇒ Object



6
7
8
9
# File 'lib/siftly/aggregators.rb', line 6

def call(filter_results:, threshold:, context:)
  score = filter_results.sum(&:score)
  { spam: filter_results.any?(&:matched?), score: score }
end