aboutsummaryrefslogblamecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/integer/inflections.rb
blob: a86c4cc26c505fe1487b459ffff277b4a02a3b48 (plain) (tree)
1
2
3
4


                                                   
                           










                                    
require File.dirname(__FILE__) + '/../../inflector'
module ActiveSupport #:nodoc:
  module CoreExtensions #:nodoc:
    module Integer #:nodoc:
      module Inflections
        # 1.ordinalize  # => "1st"
        # 3.ordinalize  # => "3rd"
        # 10.ordinalize # => "10th"
        def ordinalize
          Inflector.ordinalize(self)
        end
      end
    end
  end
end