Robert Klemme wrote:
> On 17.10.2007 22:10, Perry Smith wrote:
>>   end
>> end
>> 
>> Then to reference foo from an instance of the class (or subclass), I do:
>> 
>>   self.class.foo
>> 
>> Is there a cleaner way, in particular for the reference of the class
>> instance variable, to do this?
> 
> class << self
>    attr_accessor :foo
> end
> 
>   robert

Thanks!

Do I still do the self.class.foo to access it?

-- 
Posted via http://www.ruby-forum.com/.