I tried to do this via word = "bottle" + ("s" unless num == 1),
but it complains about concatenating "bottle" with nil.
Thanks,
rjtucke
How about word = "bottle" + (num == 1 ? "" : "s")
There's probably something better but that takes care of the nil thing.
word = (num == 1) ? "bottle" : "bottles"
Sri
"rjtucke" <rjt...@gmail.com> wrote in message
news:1149710220.0...@i40g2000cwc.googlegroups.com...
word = "bottle" << (num == 1 ? "" : "s")
Cheers,
Daniel
"rjtucke" <rjt...@gmail.com> wrote in message
news:1149710220.0...@i40g2000cwc.googlegroups.com...
Rails is not "built-in" to Ruby. It's a separate third party web
application framework. Downloading and installing a whole web
application framework just to pluralize a word for a "99 Bottles of
Beer" program would be beyond ludicrous.