Method: Inflections.singularize

Defined in:
lib/build/ExtendedString.rb

.singularize(word, locale = :en) ⇒ Object

The reverse of pluralize, returns the singular form of a word in a string.

If passed an optional locale parameter, the word will be singularized using rules defined for that language. By default, this parameter is set to :en.



221
222
223
# File 'lib/build/ExtendedString.rb', line 221

def singularize(word, locale = :en)
  apply_inflections(word, inflections(locale).singulars)
end