Wednesday, March 25, 2015

What is the use of 'require' in ruby ?

Please run below commands on rails console.

Input:     require "file_name"
Output:  true => load the file

Input:    require "file_name"
Output: false => already load

Input:    require "file_name"
Output: Error => Need to add this file

No comments:

Post a Comment