Invoked when a reference is made to an undefined constant in mod.
It is passed a symbol for the undefined constant, and returns a value to be
used for that constant. The following code is an example of the same:

def Foo.const_missing(name)name# return the constant name as SymbolendFoo::UNDEFINED_CONST#=> :UNDEFINED_CONST: symbol returned

In the next example when a reference is made to an undefined constant, it
attempts to load a file whose name is the
lowercase version of the constant (thus class Fred is assumed to be in file
fred.rb). If found, it returns the loaded class. It therefore implements
an autoload feature similar to Kernel#autoload and Module#autoload.