method
round
v5.1.7 -
Show latest stable
- Class:
ActiveSupport::NumberHelper::RoundingHelper
round(number)public
No documentation available.
# File activesupport/lib/active_support/number_helper/rounding_helper.rb, line 10
def round(number)
return number unless precision
number = convert_to_decimal(number)
if significant && precision > 0
round_significant(number)
else
round_without_significant(number)
end
end