method

convert

Importance_0
convert() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activesupport/lib/active_support/number_helper/number_to_currency_converter.rb, line 10
      def convert
        number = self.number.to_s.strip
        format = options[:format]

        if number.sub!(/^-/, "") &&
           (options[:precision] != 0 || number.to_f > 0.5)
          format = options[:negative_format]
        end

        rounded_number = NumberToRoundedConverter.convert(number, options)
        format.gsub("%n", rounded_number).gsub("%u", options[:unit])
      end
Register or log in to add new notes.