When I want to access the constant CONST
in class Test
in
class Test
CONST = 7
end
from outside of the class, I have to do this:
puts Test::CONST
Why do I get an error when I do this?
puts obj::CONST
If obj
is an object of the Test
class, why do I get an error if I try to access the constant through the object?