Class: Siftly::Aggregators::Score
- Inherits:
-
Object
- Object
- Siftly::Aggregators::Score
- Defined in:
- lib/siftly/aggregators.rb
Instance Method Summary collapse
Instance Method Details
#call(filter_results:, threshold:, context:) ⇒ Object
13 14 15 16 |
# File 'lib/siftly/aggregators.rb', line 13 def call(filter_results:, threshold:, context:) score = filter_results.sum(&:score) { spam: score >= threshold.to_f, score: score } end |