I guess I'm asking for the difference between @store
and @@store
in the following:
class Test
@@store = 9
class << self
def set_store(v)
@store = v
end
def store
@store
end
def sstore
@@store
end
end
end
Test.set_store 8
p Test.store # 8
p Test.sstore # 9
a = Test.new
p a.class.store # 8
p a.class.sstore # 9
Where are static variables attached to if not the eigenclass? Are the two effectively the same in terms of interaction?