class PIM::Statistics::OldStatisticsResult

Public Class Methods

new() click to toggle source
# File statistics.rb, line 315
def initialize
  @charts = {}
end

Public Instance Methods

as_json() click to toggle source
# File statistics.rb, line 323
def as_json
  json = []
  @charts.each do |name, charts|
    charts.as_json.each do |chart|
      hash =  {
        :name => name,
      }
      json << hash.merge(chart)
    end
  end
  json
end
chart(name) click to toggle source
# File statistics.rb, line 319
def chart name
  @charts[name] ||= OldChart.new(name)
end