method

autoload

v1_8_7_330 - Show latest stable - Class: Module
autoload(p1, p2)
public

Registers filename to be loaded (using Kernel::require) the first time that name (which may be a String or a symbol) is accessed in the namespace of mod.

module A
end
A.autoload(:B, "b")
A::B.doit            # autoloads "b"