M
Michael Linfield
If i had an array containing a lot of words, and i wanted to add grammar
rules to those words, ie make words plural how would i duplicate the
original element and then modify that element with the grammar rule, and
id hope to iterate this for all the words and apply grammar rules via a
defined method.
IE:
array = ["sky","knife","kitty"]
after applying gsub or some other method such as inject or collect...the
array would become...
array #=> ["sky","skies","knife","knives","kitty","kitties"]
and whatnot ect ect.
id rather not gsub all the grammar rules lol.
Any ideas?
Thanks!
-Mac
rules to those words, ie make words plural how would i duplicate the
original element and then modify that element with the grammar rule, and
id hope to iterate this for all the words and apply grammar rules via a
defined method.
IE:
array = ["sky","knife","kitty"]
after applying gsub or some other method such as inject or collect...the
array would become...
array #=> ["sky","skies","knife","knives","kitty","kitties"]
and whatnot ect ect.
id rather not gsub all the grammar rules lol.
Any ideas?
Thanks!
-Mac