These other posts should help you with your question:
Class variables are accessible by subclasses, but instance variables bound to a class object are not.
class A
@a = 1 # instance variable bound to A
@@b = 2 # class variable bound to A
end
class B < A; end # B is a subclass of A
# B has access to the class variables defined in A
B.class_variable_get(:@@b) # => 2
# B does not have access to the instance variables bound to the A object
B.instance_variable_get(:@a) # => nil
Instance variables bound to a class object are often referred to as 'class instance variables'.