Ruby Programming Language Question: Download Ruby PDF

What is the use of load and require in ruby?

Tweet Share WhatsApp

Answer:

Reuire() loads and processes the Ruby code from a separate file, including whatever classes, modules, methods, and constants are in that file into the current scope.
Load() performs the inclusion operation once, it reprocesses the code every time load is called.

Download Ruby PDF Read All 26 Ruby Questions
Previous QuestionNext Question
What is the use of super in Ruby Rails?Explain the use of global variable $ in Ruby?