module NexusCore::ReportUtils::PercentageHelper

Public Instance Methods

to_percentage(num) click to toggle source
# File lib/nexus_core/report_utils.rb, line 46
def to_percentage(num)
  "#{to_percentage_number(num)}%"
end
to_percentage_number(num) click to toggle source
# File lib/nexus_core/report_utils.rb, line 50
def to_percentage_number(num)
  (num * 100).round(2)
end