Gaetan Dubar Gaetan Dubar - 9 months ago 34
Ruby Question

Best way to require all files from a directory in ruby?

What's the best way to require all files from a directory in ruby ?

Answer

How about:

Dir["/path/to/directory/*.rb"].each {|file| require file }