Class: Workarea::Segment::Rules::Revenue
- Defined in:
- app/models/workarea/segment/rules/revenue.rb
Instance Method Summary collapse
Methods inherited from Base
Methods included from ApplicationDocument
Methods included from Sidekiq::Callbacks
add_worker, assert_valid_config!, async, caching_classes?, disable, enable, inline, #run_callbacks, workers, workers_list
Methods included from Mongoid::Document
Instance Method Details
#qualifies?(visit) ⇒ Boolean
8 9 10 11 12 13 |
# File 'app/models/workarea/segment/rules/revenue.rb', line 8 def qualifies?(visit) return false if minimum.blank? && maximum.blank? (minimum.blank? || visit.metrics.revenue.to_m >= minimum) && (maximum.blank? || visit.metrics.revenue.to_m <= maximum) end |