Sha256: 69234ba7464b4a4bde1f2618b61c699bcab29e6f61f3fcebd51be3b6e7960cd1
Contents?: true
Size: 429 Bytes
Versions: 9
Compression:
Stored size: 429 Bytes
Contents
module ActiveReporter module Serializer class NestedHash < Base def table report.hashed_data.collect { |row| row.map { |k,v| [k, (v.respond_to?(:min) ? v.min : v).to_s] }.to_h }.collect do |row| report.grouper_names.reverse.inject(row.slice(*report.all_aggregators.keys)) { |nested_row_data, group| { row[group] => nested_row_data } } end.reduce({}, :deep_merge) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems