Method: MotionSupport::Inflector::Inflections#plural
- Defined in:
- motion/inflector/inflections.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.
99 100 101 102 103 |
# File 'motion/inflector/inflections.rb', line 99 def plural(rule, replacement) @uncountables.delete(rule) if rule.is_a?(String) @uncountables.delete(replacement) @plurals.prepend([rule, replacement]) end |