Nathan Olberding wrote:
> zdennis wrote:
>> Nathan Olberding wrote:
>> No. You just need to understand how classes and instances of a class 
>> work.
> 
> I understand how it works. In Ruby, (almost) everything is an object. 
> Therefor, when I'm defining a class and I want a class variable to be 
> accessible, I need to say so in defining the class, not in defining how 
> instances of the class work.
> 
> Again, I understand how it works. I'm just trying to point out that 
> sure, doing it this way proves that the coder knows how Ruby works, but 
> it also makes the code reader think more than maybe they should need to. 
> This works in direct contrast with the perception that Ruby lets you 
> focus more on solving problems and less on writing code.
> 
> Just my perception as someone who just spent half a day trying to work 
> around language particularities.
> 

If you want you can extend ruby to do what *you* want. Ruby gives you
this flexibility...

class Class
   def attr_class_accessor arg
     instance_eval "class << self ; attr_accessor :#{arg} ; end"
   end
end

class A
  attr_class_accessor :b
end



Zach