Method: ExtlibCopy::Inflection.word

Defined in:
lib/inflection.rb

.word(singular, plural = nil) ⇒ Object

Defines a general inflection exception case.

Parameters

singular<String>

singular form of the word

plural<String>

plural form of the word

Examples

Here we define erratum/errata exception case:

English::Inflect.word “erratum”, “errata”

In case singular and plural forms are the same omit second argument on call:

English::Inflect.word ‘information’



161
162
163
164
165
# File 'lib/inflection.rb', line 161

def word(singular, plural=nil)
  plural = singular unless plural
  singular_word(singular, plural)
  plural_word(singular, plural)
end