Re: [wtr-general] Ruby Array Question

2011-12-20 Thread Ċ½eljko Filipin
On Mon, Dec 19, 2011 at 9:05 PM, Jason Shelton jas.shel...@hotmail.com wrote: I have setup a Ruby class, made up of a bunch of subroutines. I am not sure what are you trying to do, but I would recommend that you start using one of the ruby testing frameworks. They have already solved all such

[wtr-general] Ruby Array Question

2011-12-19 Thread Jason Shelton
All, I have setup a Ruby class, made up of a bunch of subroutines. Below is an illustration: class BigTestClass def scenario1#testScenario end def scenario2#testScenario end end I have an array that consists of the names of all of the subroutines above: allMyTests = {scenario1,

[wtr-general] Ruby array question

2010-02-25 Thread xguarder
Question about an array. Say I have the following array... textlist = [Apple, Orange, Lemon, Grape, Orange, Melon, Orange, Banana] if I did textlist.index(Orage), I would get 1 returned. Can anyone tell me how I could retrieve the index number of the 2nd instance of Orange? Thanks in advance!