From: Greg Willits Date: 2007-11-20T09:59:44+09:00 Subject: Re: Assignment without attr= Justin Collins wrote: > or if you want it even shorter, less 'method-call-like' > > def [] num > @packedNumber = num > end > > whatever['12345'] Yeah, either of those (.set or [ ]) will be fine. Tim Hunter wrote: >maybe I'm missing something obvious here, but why not just take the >initial value as an argument to initialize? I want to allow assignment at initialization as you say, and an alternate method too. I'm just experimenting/exploring what's possible. Thanks guys. -- gw -- Posted via http://www.ruby-forum.com/.