1.

What Is The Purpose Of Load, Auto_load, And Require_relative In Ruby ?

Answer»

Load allows the process or a method to be loaded in the memory and it actually processes the EXECUTION of the program USED in a separate file.

It includes the classes, modules, methods and other FILES that executes in the current scope that is being defined. It performs the inclusion operation and reprocesses the whole code every time the load is being called.

REQUIRE is same as load but it loads code only once on first time.

Auto_load: this initiates the method that is in hat file and allows the interpreter to call the method.
require_relative: allows the loading to take place of the local folders and files.

Load allows the process or a method to be loaded in the memory and it actually processes the execution of the program used in a separate file.

It includes the classes, modules, methods and other files that executes in the current scope that is being defined. It performs the inclusion operation and reprocesses the whole code every time the load is being called.

require is same as load but it loads code only once on first time.

Auto_load: this initiates the method that is in hat file and allows the interpreter to call the method.
require_relative: allows the loading to take place of the local folders and files.



Discussion

No Comment Found