diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-03-21 04:13:57 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-03-21 04:39:53 -0700 |
commit | 54cf0fc476b2d77adb8a124c27a79a048fa4ddb5 (patch) | |
tree | ef51d129ec8d0ff15507c61f97fdc32ab1d89633 /activesupport/lib/active_support/core_ext/integer/inflections.rb | |
parent | b4a1718832c70005e45a930d5106857cf882e147 (diff) | |
download | rails-54cf0fc476b2d77adb8a124c27a79a048fa4ddb5.tar.gz rails-54cf0fc476b2d77adb8a124c27a79a048fa4ddb5.tar.bz2 rails-54cf0fc476b2d77adb8a124c27a79a048fa4ddb5.zip |
Convert integer extension modules to class reopens
Diffstat (limited to 'activesupport/lib/active_support/core_ext/integer/inflections.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/integer/inflections.rb | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/activesupport/lib/active_support/core_ext/integer/inflections.rb b/activesupport/lib/active_support/core_ext/integer/inflections.rb index 804702beb2..7a8c081b73 100644 --- a/activesupport/lib/active_support/core_ext/integer/inflections.rb +++ b/activesupport/lib/active_support/core_ext/integer/inflections.rb @@ -1,20 +1,14 @@ require 'active_support/inflector' -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Integer #:nodoc: - module Inflections - # 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 - Inflector.ordinalize(self) - end - end - end +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 + Inflector.ordinalize(self) end end |