--0015174c43103ce3f7046d3bb935
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

> This is the pattern I use:
>
> http://pastie.org/516343 <http://pastie.org/516343>

I only see one problem with that: You can't assign nil or false to the
attribute that way.
And I have to say that's pretty much one of the most essential features I
use -- all the time :-)

Greetz!
k

2009/6/25 Gregory Brown <gregory.t.brown / gmail.com>

> On Thu, Jun 25, 2009 at 2:05 PM, Marc Heiler<shevegen / linuxmail.org>
> wrote:
> > We can do:
> >
> >  attr_accessor :bla
> >
> > Now, on an object one can do this:
> >
> >  object.bla  foo'
> >
> > Or
> >  object.bla
> >
> > to retrieve the value.
> >
> > I am wondering whether we could do this:
> >
> >  object.bla 'foo'
>
>
> Since it's really only valuable to me when I make certain types of
> DSLs, I don't see the need for it to be in the language.
> But I feel the above pattern is fairly clean.
>
> -greg
>
>

--0015174c43103ce3f7046d3bb935--