On Oct 5, 2013, at 13:01 , Doug Jolley <lists / ruby-forum.com> wrote:

> It appears (to me) that if one wants to access a class variable from =
an
> instance method, accessor methods need to be provided.  Am I missing
> anything on this?  Thanks.

Class variable? (@@var): no. You can simply access it.

Class INSTANCE variable? (@var, at class scope): absolutely, you must =
define accessor methods.

IMHO, you should be accessing ALL state (instance or class) via accessor =
methods. This makes refactoring and changing the design _much_ easier.