On 2/17/06, ara.t.howard / noaa.gov <ara.t.howard / noaa.gov> wrote:
> On Sat, 18 Feb 2006, Patrick Hurley wrote:
>
> > On 2/17/06, Ruby Quiz <james / grayproductions.net> wrote:
> >>         #
> >>         # 'attribute' must provide a method for providing a default value as hash
> >>         #
> >
> >>         #
> >>         # 'attribute' must provide a method for providing a default value as block
> >>         # which is evaluated at instance level
> >>         #
> >
> > <pedantic>
> >  What if they provide both?
> > </pedantic>
>
>
> i generally make a block the winner because it's bigger visually and harder to
> type - ergo one generally meant it if one typed it.  whereas a hash is easy to
> accidentally pass using
>
>    attribute(*args){ Time::now }
>                 ^
>                 ^
>                 hash in here
>
> suppose you could throw an error too - not my style - but it makes sense.
>
> cheers.
>
> -a
>
> --
> judge your success by what you had to give up in order to get it.
> - h.h. the 14th dali lama
>
>

Thanks ok last question (probalby), if remove_instance_variable is
called, and the attribute is subsequently accessed is it reset to the
default value?

Thanks again for a good quiz
pth