Difference between class variables and class instance variables?
A class variable (@@) is shared among the class and all of its descendants. A class instance variable (@) is not shared by the class’s descendants. Class variable (@@) Let’s have a class Foo with a class variable @@i, and accessors for reading and writing @@i: class Foo @@i = 1 def self.i @@i end … Read more