Sha256: 1372c79c68f859eeec34eeca2e0bb57189d5aeb9daa63ee342fbf3fdffd6f050

Contents?: true

Size: 318 Bytes

Versions: 49

Compression:

Stored size: 318 Bytes

Contents

module ActiveSupport
  module NumberHelper
    class NumberToPercentageConverter < NumberConverter # :nodoc:
      self.namespace = :percentage

      def convert
        rounded_number = NumberToRoundedConverter.convert(number, options)
        options[:format].gsub('%n', rounded_number)
      end
    end
  end
end

Version data entries

49 entries across 49 versions & 4 rubygems

Version Path
activesupport-4.1.16 lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.1.16.rc1 lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.1.15 lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.1.15.rc1 lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.1.14.2 lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.1.14.1 lib/active_support/number_helper/number_to_percentage_converter.rb
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/activesupport-4.1.13/lib/active_support/number_helper/number_to_percentage_converter.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/activesupport-4.1.13/lib/active_support/number_helper/number_to_percentage_converter.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/activesupport-4.1.13/lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.1.14 lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.1.14.rc2 lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.1.14.rc1 lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.1.13 lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.1.13.rc1 lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.1.12 lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.1.12.rc1 lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.1.11 lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.1.10 lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.1.10.rc4 lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.1.10.rc3 lib/active_support/number_helper/number_to_percentage_converter.rb