Sha256: 12fc6c9cdc3d5146c278d5c783e071db22e7d5f55a71c08fd341b5e2008c9e01

Contents?: true

Size: 318 Bytes

Versions: 53

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

53 entries across 51 versions & 10 rubygems

Version Path
activesupport-4.2.5.2 lib/active_support/number_helper/number_to_percentage_converter.rb
activejob-lock-0.0.2 rails/activesupport/lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.2.5.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.2.4/lib/active_support/number_helper/number_to_percentage_converter.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/number_helper/number_to_percentage_converter.rb
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.5/lib/active_support/number_helper/number_to_percentage_converter.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5/lib/active_support/number_helper/number_to_percentage_converter.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.2.5 lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.2.5.rc2 lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.2.5.rc1 lib/active_support/number_helper/number_to_percentage_converter.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.2.4 lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.2.4.rc1 lib/active_support/number_helper/number_to_percentage_converter.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/activesupport-4.2.3/lib/active_support/number_helper/number_to_percentage_converter.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/activesupport-4.2.3/lib/active_support/number_helper/number_to_percentage_converter.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/activesupport-4.2.1/lib/active_support/number_helper/number_to_percentage_converter.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/activesupport-4.2.2/lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.2.3 lib/active_support/number_helper/number_to_percentage_converter.rb
activesupport-4.2.3.rc1 lib/active_support/number_helper/number_to_percentage_converter.rb