From: "David A. Black" Date: 2008-04-30T22:46:51+09:00 Subject: Re: How to create "def method(item)= (value)" ? --1926193751-1378202096-1209563210=:10337 Content-Type: MULTIPART/MIXED; BOUNDARY="1926193751-1378202096-1209563210=:10337" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1926193751-1378202096-1209563210=:10337 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Hi -- On Wed, 30 Apr 2008, I=C3=B1aki Baz Castillo wrote: > 2008/4/30, David A. Black : > >> You could also do: >> >> def param[]=3D(key,value) >> @params[key] =3D value >> end >> >> object.param[key] =3D value > > That's not valid, a method cannot contain []: Yikes. Sorry. I'm being stupid. (I think there was some real code of which that was a wrong version, but now I can't remember what I meant....) David --=20 Rails training from David A. Black and Ruby Power and Light: INTRO TO RAILS June 9-12 Berlin ADVANCING WITH RAILS June 16-19 Berlin INTRO TO RAILS June 24-27 London (Skills Matter) See http://www.rubypal.com for details and updates! --1926193751-1378202096-1209563210=:10337-- --1926193751-1378202096-1209563210=:10337--