Class: Workarea::Metrics::SegmentByDay
- Inherits:
-
Object
- Object
- Workarea::Metrics::SegmentByDay
- Includes:
- ByDay
- Defined in:
- app/models/workarea/metrics/segment_by_day.rb
Instance Method Summary collapse
Methods included from Mongoid::Document
Instance Method Details
#average_order_value ⇒ Object
25 26 27 28 |
# File 'app/models/workarea/metrics/segment_by_day.rb', line 25 def average_order_value return nil if orders.zero? revenue / orders.to_f end |