lib/proforma/compiling/aggregation.rb in proforma-1.0.0.pre.alpha vs lib/proforma/compiling/aggregation.rb in proforma-1.0.0

- old
+ new

@@ -17,10 +17,12 @@ raise ArgumentError, 'evaluator is required' unless evaluator @aggregators = Array(aggregators) @counters = {} @evaluator = evaluator + + freeze end def add(records) records.each do |record| aggregators.each do |aggregator| @@ -33,10 +35,10 @@ end self end - def to_hash + def to_h aggregators.map { |aggregator| execute(aggregator) }.to_h end private