def calculate(meters, date)
      numerator = meters[@numerator] ? (meters[@numerator][date] || 0) : 0
      denominator = meters[@denominator] ? (meters[@denominator][date] || 0) : 0

      value = denominator.zero? ? 0.0 : (numerator.to_f / denominator.to_f)
      value *= 100 if @format == FORMAT_PERCENTAGE

      return sprintf(@format, value)
    end
def calculate(meters, date)
      numerator = meters[@numerator] ? (meters[@numerator][date] || 0) : 0
      denominator = meters[@denominator] ? (meters[@denominator][date] || 0) : 0

      value = denominator.zero? ? 0.0 : (numerator.to_f / denominator.to_f)
      value *= 100 if @format == FORMAT_PERCENTAGE

      return sprintf(@format, value)
    end
TODO: Rename format attr
 rubocop:disable Style/FormatString