[wtr-general] Re: watir.rb - matches functions

2009-05-20 Thread Paul Denize
So you can build a function that takes in both an Integer, String, or Regex and then matchs it without having to build a case or switch if (parameter.matches(value)) note parameter could be any of the three types and the correct match function will apply. --~--~-~--~~

[wtr-general] Re: watir.rb - matches functions

2009-04-22 Thread Bret Pettichord
Paul Denize wrote: > In watir.rb there are several class additions to add a matches > function that is similar in each type (see below). > > Wouldn't it be a little more consistent if they all returned the same > data types. > Maybe. Why do you ask? -- Bret Pettichord CTO, WatirCraft LLC, www