Method: Inflections#plural
- Defined in:
- lib/build/ExtendedString.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.
113 114 115 116 117 |
# File 'lib/build/ExtendedString.rb', line 113 def plural(rule, replacement) @uncountables.delete(rule) if rule.is_a?(String) @uncountables.delete(replacement) @plurals.unshift([rule, replacement]) end |