Method: English::Inflect.plural
- Defined in:
- lib/strokedb/util/inflect.rb
.plural(word) ⇒ Object Also known as: pluralize
Convert an English word from singular to plurel.
"boy".plural #=> boys
"tomato".plural #=> tomatoes
106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/strokedb/util/inflect.rb', line 106 def plural(word) if result = plural_of[word] return result.dup end #return self.dup if /s$/ =~ self # ??? result = word.dup pluralization_rules.each do |(match, replacement)| break if result.gsub!(match, replacement) end return result end |