From: Albert Schlef Date: 2009-03-02T15:11:27+09:00 Subject: Re: Delegating class methods Albert Schlef wrote: > You can do the following: > > class Foo > @one = 1 > @two = 2 > @three = 3 > > class << self > attr_accessor :one, :two, :Tthee > end > end > > (Why are you doing '@@' instead of '@'?) BTW, there's some glitch here. Let's say you inherit from Foo: class Momo < Foo end puts Momo.one # won't print "1" !!! The assignments to the attirbutes (in Foo's body) are happening in Foo's bag, not in Momo's bag -- Posted via http://www.ruby-forum.com/.