Class: Rational
Class Method Summary collapse
-
.[](*args) ⇒ Object
Alternate initializer (‘Rational`).
Instance Method Summary collapse
-
#percent(decimals = 1) ⇒ Object
Convert the float to a rounded percentage string (eg: “42.5%”) (see: Float#percent).
Class Method Details
Instance Method Details
#percent(decimals = 1) ⇒ Object
Convert the float to a rounded percentage string (eg: “42.5%”) (see: Float#percent)
476 477 478 |
# File 'lib/epitools/core_ext/numbers.rb', line 476 def percent(decimals=1) to_f.percent(decimals) end |