-
-
Save gearnode/d404e9e1201ddf907f83 to your computer and use it in GitHub Desktop.
require all ruby files in one directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Require all | |
def require_all path | |
global = File.join(File.dirname(__FILE__), path, '*.rb') | |
Dir[global].each do |file| | |
require file | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment