If (for whatever reason) I extend Stuff
in class Dog
how can I access CONST1
through the Dog class? I know I can get CONST1 by saying Stuff::CONST1
, but how through dog can I get it. I also know that this code would work if I include Stuff
in class Dog
.
module Stuff
CONST1 = "Roll Over"
end
class Dog
extend Stuff
end
Dog::CONST1 #NameError: uninitialized constant Dog::CONST1