On 12/12/06, Ryan Williams <mr.cruft / gmail.com> wrote:
> >
> > As you can see in the first one.. even a single value passed to an
> > assignment is parsed as an array. If you need multiple arguments to an
> > assignment, you have to handle them inside the method body itself.
> >
> >
> You are correct.  That's pretty useful, though you still can't pass in
> blocks.
>
> The reason I was interested in this was that I wanted to create some
> attributes that could be assigned either a literal value, or a block that
> returned the literal value when called.  Then you could do some really lazy
> evaluation, as in:

Check this out; it may be helpful to you. Pretty similar. It differs
only in where the block is written, but that would be easy to change.

http://www.rubyquiz.com/quiz67.html