Attempt to autoload the provided module name by searching for a directory
matching the expected path suffix. If found, the module is created and
assigned to into's constants with the name const_name.
Provided that the directory was loaded from a reloadable base path, it is
added to the set of constants that are to be unloaded.
# File activesupport/lib/active_support/dependencies.rb, line 499
def autoload_module!(into, const_name, qualified_name, path_suffix)
return nil unless base_path = autoloadable_module?(path_suffix)
mod = Module.new
into.const_set const_name, mod
log("constant #{qualified_name} autoloaded (module autovivified from #{File.join(base_path, path_suffix)})")
autoloaded_constants << qualified_name unless autoload_once_paths.include?(base_path)
autoloaded_constants.uniq!
mod
end