class PIM::Statistics::StatisticsManager
Attributes
statistic_templates[R]
statistics[R]
Public Class Methods
new()
click to toggle source
# File statistics.rb, line 248 def initialize @statistics = {} @statistic_templates = {} end
Public Instance Methods
calculate_statistics(old_item, new_item)
click to toggle source
# File statistics.rb, line 257 def calculate_statistics old_item, new_item result = [] @statistics.each_value do |statistic| result += statistic.calculate_statistic(old_item, new_item) end result end
create_statistics(&block)
click to toggle source
# File statistics.rb, line 253 def create_statistics &block StatisticsBuilder.new(@statistics, @statistic_templates, &block) end