In the following fragment, is it possible to refer to the FOO constant from outside the module, and if so, how?
module X
class << self
FOO = 2
end
end
In the following fragment, is it possible to refer to the FOO constant from outside the module, and if so, how?
module X
class << self
FOO = 2
end
end
class <<X
self
end::FOO
or
class Object
def metaclass
class <<self
self
end
end
end
X.metaclass::FOO