Sha256: 7a16b0dd8d78c7cca37593473f2e4abd2461973fc71c83dfb1a4cdba481362e5

Contents?: true

Size: 186 Bytes

Versions: 9

Compression:

Stored size: 186 Bytes

Contents

module MetricFu
  module Calculate
    module_function

    def integer_percent(num, total)
      return 0 if total.zero?
      (Float(num) / Float(total) * 100).round
    end
  end
end

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
metric_fu-4.13.0 lib/metric_fu/calculate.rb
fastruby-metric_fu-5.0.0 lib/metric_fu/calculate.rb
code_metric_fu-4.14.4 lib/metric_fu/calculate.rb
code_metric_fu-4.14.3 lib/metric_fu/calculate.rb
code_metric_fu-4.14.2 lib/metric_fu/calculate.rb
code_metric_fu-4.14.1 lib/metric_fu/calculate.rb
code_metric_fu-4.14.0 lib/metric_fu/calculate.rb
metric_fu-4.12.0 lib/metric_fu/calculate.rb
metric_fu-4.11.4 lib/metric_fu/calculate.rb