Class: Workarea::Metrics::SegmentByDay

Inherits:
Object
  • Object
show all
Includes:
ByDay
Defined in:
app/models/workarea/metrics/segment_by_day.rb

Instance Method Summary collapse

Methods included from Mongoid::Document

#embedded_children

Instance Method Details

#average_order_valueObject



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