P
Paul Sholtz
Is there a method in the Ruby array object that gives anything like a
"contains?" method, to test if an object is already in the Array?
For the time being, I've extended the Array class as follows:
http://pastie.org/1627594
I wondered if this was a good way, or if there was already something in
the API that allowed for this. I couldn't seem to find anything..
"contains?" method, to test if an object is already in the Array?
For the time being, I've extended the Array class as follows:
http://pastie.org/1627594
I wondered if this was a good way, or if there was already something in
the API that allowed for this. I couldn't seem to find anything..