http://lovehateubuntu.blogspot.com/2009/04/hungarian-notation-in-ruby.html
<--haha... noted...

On Nov 30, 3:17 pm, Charley Baker <charley.ba...@gmail.com> wrote:
> Symbols and strings aren't interchangeable, but you can convert.
>
> "name".to_sym
> => :name
> :name.to_s
> => "name"
>
> The first part of the method argument takes a symbol, not a string:
> sname = "name"
> ff.link(sname.to_sym,skeyword).exists?
>
> Not tested, but should work. As an aside, hungarian notation in Ruby
> looks weird and kind of makes no sense. :)
>
> Charley Baker
> Lead Developer, Watir,http://watir.com
>
> On Tue, Nov 30, 2010 at 12:41 PM, dave <davidrey...@gmail.com> wrote:
> > Currently,
>
> > ff.link(:name,/google/).exists? works and returns true.
>
> > However, if I variablize things
>
> > sname = ":name"
> > skeyword = "/google."
>
> > ff.link(sname,skeyword).exists? returns false.
>
> > Is there any text that states how to go about this?
>
> > Thanks
>
> > --
> > Before posting, please readhttp://watir.com/support. In short: search 
> > before you ask, be nice.
>
> > watir-general@googlegroups.com
> >http://groups.google.com/group/watir-general
> > watir-general+unsubscr...@googlegroups.com

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

Reply via email to