Constant in class << self block

In the following fragment, is it possible to refer to the constant FOO from outside the module, and if so, how?

 module X class << self FOO = 2 end end 
+6
source share
1 answer
 class <<X self end::FOO 

or

 class Object def metaclass class <<self self end end end X.metaclass::FOO 
+6
source

All Articles