A commonly used shortcut uses arrays to quickly load a collection of libraries at once. : require « Language Basics « Ruby






A commonly used shortcut uses arrays to quickly load a collection of libraries at once.


%w{file1 file2 file3 file4 file5}.each { |l| require l }

 

Related examples in the same category

1.put this code in a file called string_extensions.rb:
2.Test require command
3.Nested Inclusions