Wayne Walker wrote in post #980677:
> maybe class variables are not really class variables,
> but are rather hierarchy variables that can only exist in one place in
> an class and it ancestry?

That's exactly it. Class variables are something of a misfeature in 
Ruby.

However, in Ruby everything is an object - including a Class. So you can 
use a regular instance variable of the class itself. Just change all 
'@@'s to '@' in your code, and it will work the way you want.

To access the value from an instance method, use

    self.class.get_a

(because 'class' is otherwise a keyword)

HTH,

Brian.

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