From: David Garamond Date: 2004-06-08T18:55:08+09:00 Subject: Re: accessing class instance variable from instance method Mehr, Assaph (Assaph) wrote: >>My very small rant is, accessing class variables (@@var) from inside >>instance method is much easier and more straightforward; however, I > tend >>to use class instance variable more often, since in Ruby1.x @@var is >>shared in subclasses (IIRC this will change in Ruby2). I've never find > a >>use for @@var so far in my programs. > > But you're trying to access a (private) variable on a completely > different, and only vaguely related, object. Why should you have a > "nice" way? Then perhaps Ruby should not provide a "nice" way to access @@var too :-) > I don't often use @@var either. I use a class instance variable only > when it has to do with the internal mechanics of the object representing > the class, nothing for the objects instanciated from the class top muck > around with. > > > -- dave