Module: Jirafe::Resource::TimeSeries
- Included in:
- Sites::AbandonRate, Sites::AbandonedAverageOrderValue, Sites::AbandonedCarts, Sites::AbandonedRevenue, Sites::AverageOrderValue, Sites::BouncesRate, Sites::ConversionRate, Sites::Conversions, Sites::Customers, Sites::Revenues, Sites::RevenuesAverage, Sites::TotalCarts, Sites::Visits
- Defined in:
- lib/jirafe/resource/time_series.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 |
# File 'lib/jirafe/resource/time_series.rb', line 4 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#observation_totals ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/jirafe/resource/time_series.rb', line 18 def observation_totals self.class.count_keys.inject({}) do |hash, key| hash[key] = observe.inject(0) do |sum, observation| sum += observation[key] end hash end end |