Sha256: 2f5c0a6f5e8087ce1c398c7647d289150456405ba42a9443c02105ec4eb6c8d3

Contents?: true

Size: 282 Bytes

Versions: 1

Compression:

Stored size: 282 Bytes

Contents

module Prosperity
  module MetricsHelper
    def data_for_metric(metric)
      metric.extractors.inject({}) do |h, ext_klass|
        ext = ext_klass.new(metric, 12.month.ago, Time.now, Prosperity::Periods::MONTH)
        h[ext.key] = ext.to_a
        h
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
prosperity-0.0.1 app/helpers/prosperity/metrics_helper.rb