Thanks very much!.

Carl Mueller

Mathieu Bouchard <matju / sympatico.ca> wrote:
> On Thu, 10 Jan 2002 cmlr / math.rochester.edu wrote:
>> Does anyone know the best way to make instance variables in a class
>> automatically accessible?  In other words, how do you avoid writing
>> attr_accessor :a, :b, :c
> class Class
>   alias oldNew new
>   private :oldNew
>   def new(*args)
>     o = oldNew(*args)
>     unless @attribs_created
>       for v in o.instance_variables
>         attr_accessor v[1..-1].intern
>       end
>       @attribs_created=true
>     end
>     o
>   end
> end