Class: Decidim::MetricOperationManifest

Inherits:
MetricManifest show all
Defined in:
decidim-core/lib/decidim/metric_operation_manifest.rb

Overview

This class acts as a manifest for metrics operations.

This manifest is an expansion from Decidim::MetricManifest that holds and stores operations, metrics and measure class, for operations purpose

Instance Method Summary collapse

Methods inherited from MetricManifest

#has_settings?, #settings, #stat_block

Instance Method Details

#calculate(day, resource) ⇒ Object


14
15
16
17
18
19
# File 'decidim-core/lib/decidim/metric_operation_manifest.rb', line 14

def calculate(day, resource)
  operation = manager_class.constantize.new(day, resource)
  return unless operation.valid?

  operation.calculate
end