Sha256: c75aea2c74d727d13bf2805b85b64ccbfeacdefb9a18a1faae9c4bc41389b67c
Contents?: true
Size: 282 Bytes
Versions: 13
Compression:
Stored size: 282 Bytes
Contents
module ActiveReporter module Calculator class Ratio < ActiveReporter::Calculator::Base def calculate(row, parent_row) ((row[aggregator].to_f / parent_row[parent_aggregator].to_f) * 100) unless parent_row[parent_aggregator].to_f.zero? end end end end
Version data entries
13 entries across 13 versions & 1 rubygems