Ruby Language Loading Source Files Loading several files

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

You can use any ruby technique to dynamically create a list of files to load. Illustration of globbing for files starting with test, loaded in alphabetical order.

Dir[ "#{ __dir__ }**/test*.rb" ) ].sort.each do |source|

    require_relative source

end


Got any Ruby Language Question?