Sha256: accdb46e67b4651d97e66f7ab21a35d9c5732735ab55f8f8de3a422f26cf1b55

Contents?: true

Size: 401 Bytes

Versions: 56

Compression:

Stored size: 401 Bytes

Contents

require 'active_support/inflector'

class Integer
  # Ordinalize turns a number into an ordinal string used to denote the
  # position in an ordered sequence such as 1st, 2nd, 3rd, 4th.
  #
  #   1.ordinalize    # => "1st"
  #   2.ordinalize    # => "2nd"
  #   1002.ordinalize # => "1002nd"
  #   1003.ordinalize # => "1003rd"
  def ordinalize
    ActiveSupport::Inflector.ordinalize(self)
  end
end

Version data entries

56 entries across 56 versions & 5 rubygems

Version Path
social_url_stats-0.0.1 vendor/ruby/1.9.1/gems/activesupport-3.0.0/lib/active_support/core_ext/integer/inflections.rb
activesupport-3.0.20 lib/active_support/core_ext/integer/inflections.rb
activesupport-3.0.19 lib/active_support/core_ext/integer/inflections.rb
activesupport-3.0.18 lib/active_support/core_ext/integer/inflections.rb
activesupport-3.0.17 lib/active_support/core_ext/integer/inflections.rb
activesupport-3.0.16 lib/active_support/core_ext/integer/inflections.rb
activesupport-3.0.15 lib/active_support/core_ext/integer/inflections.rb
activesupport-3.0.14 lib/active_support/core_ext/integer/inflections.rb
activesupport-3.0.13 lib/active_support/core_ext/integer/inflections.rb
activesupport-3.0.13.rc1 lib/active_support/core_ext/integer/inflections.rb
activesupport-3.0.12 lib/active_support/core_ext/integer/inflections.rb
activesupport-3.0.12.rc1 lib/active_support/core_ext/integer/inflections.rb
activesupport-3.0.11 lib/active_support/core_ext/integer/inflections.rb
messagebus_ruby_api-0.4.7 spec/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/core_ext/integer/inflections.rb
messagebus_ruby_api-0.4.4 spec/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/core_ext/integer/inflections.rb
activesupport-3.0.10 lib/active_support/core_ext/integer/inflections.rb
activesupport-3.0.10.rc1 lib/active_support/core_ext/integer/inflections.rb
activesupport-3.0.9 lib/active_support/core_ext/integer/inflections.rb
activesupport-3.0.9.rc5 lib/active_support/core_ext/integer/inflections.rb
activesupport-3.0.9.rc4 lib/active_support/core_ext/integer/inflections.rb