From: ara.t.howard@... Date: 2006-07-14T06:21:36+09:00 Subject: Re: equivalent of attr_accessor for class variables? On Fri, 14 Jul 2006, bwv549 wrote: >> class C >> class << self >> attr_accessor 'class_constant' >> end >> end > > For an intermediate ruby user, could you explain what is happening in > the line: 'class << self' search the archives - this comes up about once per week. for now, suffice it do say that class C class << self # everthing here is at class scope @a_class_instance_variable = 42 def a_class_method() @a_class_instance_variable end alias_method 'one_class_method', 'to_another' extend ABunchOfClassMethods end end regards. -a -- suffering increases your inner strength. also, the wishing for suffering makes the suffering disappear. - h.h. the 14th dali lama