aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/fixnum/inflections.rb
blob: 13c4f1130a7654c96cd8b716669e851ec8a6ca3f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require File.dirname(__FILE__) + '/../../inflector'
module ActiveSupport #:nodoc:
  module CoreExtensions #:nodoc:
    module Fixnum #:nodoc:
      module Inflections
        # 1.ordinalize  # => "1st"
        # 3.ordinalize  # => "3rd"
        # 10.ordinalize # => "10th"
        def ordinalize
          Inflector.ordinalize(self)
        end
      end
    end
  end
end