pluralize function in ruby NOT RAILS!

Posted by DJTripleThreat on Stack Overflow See other posts from Stack Overflow or by DJTripleThreat
Published on 2010-03-15T09:46:01Z Indexed on 2010/03/15 9:49 UTC
Read the original article Hit count: 156

Filed under:
|
|

Writing some ruby code (not rails) and I need to handle something like this:

found 1 match
found 2 matches

I have rails installed so maybe I might be able to add a require clause at the top of the script, but does anyone know of a RUBY method that pluralizes strings? Is there a class I can require that can deal with this if the script isn't rails but I have rails installed?

Thanks in advance!

© Stack Overflow or respective owner

Related posts about ruby

Related posts about pluralize