Is it possible to recursively require all files in a directory in Ruby? -


I am working on an API for which all .rb files must be loaded in their current directory and all subdirectories. Currently, I am entering a new requirement for every file I add, but I want to create it where I only have to put one of the sub-directories and it will be automatically added. .

Is there a standard order to do this?

In this case, all the files are being loaded under the lib directory:

< Pre> Dir ["# {File.dirname (__ file __)} / lib / ** / *. Rb"]. Each {| F | Load (F)}

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

jquery - SimpleModal Confirm fails to submit form -