class A
#define class level attribute called key
class << self
attr_accessor :key
end
end
class B < A
end
B.key = "foo"
B.key # returns "foo"
A.key # returns nil
.
What is the approach if I want A.key to return "foo" in the above scenario?