1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix doc typo. Move extend self so it's more immediately obvious. Require inflections from load path.

This commit is contained in:
Jeremy Kemper 2008-06-06 03:02:22 -07:00
parent 1dbfe9766e
commit 0ccd0b569a

View file

@ -10,6 +10,8 @@ module ActiveSupport
# If you discover an incorrect inflection and require it for your application, you'll need # If you discover an incorrect inflection and require it for your application, you'll need
# to correct it yourself (explained below). # to correct it yourself (explained below).
module Inflector module Inflector
extend self
# A singleton instance of this class is yielded by Inflector.inflections, which can then be used to specify additional # A singleton instance of this class is yielded by Inflector.inflections, which can then be used to specify additional
# inflection rules. Examples: # inflection rules. Examples:
# #
@ -91,8 +93,6 @@ module ActiveSupport
end end
end end
extend self
# Yields a singleton instance of Inflector::Inflections so you can specify additional # Yields a singleton instance of Inflector::Inflections so you can specify additional
# inflector rules. # inflector rules.
# #
@ -134,7 +134,7 @@ module ActiveSupport
# "posts".singularize # => "post" # "posts".singularize # => "post"
# "octopi".singularize # => "octopus" # "octopi".singularize # => "octopus"
# "sheep".singluarize # => "sheep" # "sheep".singluarize # => "sheep"
# "word".singluarize # => "word" # "word".singularize # => "word"
# "the blue mailmen".singularize # => "the blue mailman" # "the blue mailmen".singularize # => "the blue mailman"
# "CamelOctopi".singularize # => "CamelOctopus" # "CamelOctopi".singularize # => "CamelOctopus"
def singularize(word) def singularize(word)
@ -307,4 +307,4 @@ module ActiveSupport
end end
end end
require File.dirname(__FILE__) + '/inflections' require 'active_support/inflections'