From: Austin Ziegler Date: 2005-09-08T00:00:40+09:00 Subject: Re: weird keyword parameters in rails On 9/7/05, robbie wrote: > Hi, I'm very new to Ruby, and to Ruby on Rails. > I'm halfway through the pickaxe book, past all of the stuff on syntax, > and I haven't seen anything explaining the keyword parameter syntax > used extensively in rails. The syntax I mean is: > > method( :keyword => "value" ) > > I understand how to use this, I'm just not sure where it comes from. > Am I being docile, or is this slightly weird? It's a hash with a Symbol as a parameter. Try it in irb. def foo(bar) puts bar.class puts bar.inspect end foo(:keyword => 'value') -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca