lib/comparison/presenter.rb
##
# Returns the absolute value of Comparator#relative formatted as a percentage.
#
# Use this if you are relying on other cues (colors and/or icons) to
# indicate positive or negative values.
Returns the absolute value of Comparator#relative formatted as a percentage.
Use this if you are relying on other cues (colors and/or icons) to
indicate positive or negative values.
Returns the absolute value of Comparator#relative formatted as a percentage . Use this if you are relying on other cues ( colors and / or icons ) to indicate positive or negative values .
def unsigned_percentage(**options)
      if nan? || zero?
        number_to_percentage 0, **options
      elsif infinite?
        t 'comparison.infinity_html', default: nil
      else
        number_to_percentage relative.abs, **options
      end
    end
def unsigned_percentage ( ** options ) if nan? || zero? number_to_percentage 0 , ** options elsif infinite? t 'comparison.infinity_html' , default : nil else number_to_percentage relative . abs , ** options end end
Returns the absolute value of Comparator#relative formatted as a percentage.
Returns the absolute value of Comparator#relative formatted as a percentage .
options
<not_specific>