Method: Frontline::Inflector::Inflections#plural

Defined in:
lib/frontline/inflect.rb

#plural(rule, replacement) ⇒ Object

Specifies a new pluralization rule and its replacement. The rule can either be a string or a regular expression. The replacement should always be a string that may include references to the matched data from the rule.



22
23
24
25
26
# File 'lib/frontline/inflect.rb', line 22

def plural(rule, replacement)
  @uncountables.delete(rule) if rule.is_a?(String)
  @uncountables.delete(replacement)
  @plurals.unshift([rule, replacement])
end