Last active
December 16, 2015 19:09
-
-
Save kirikiriyamama/5482910 to your computer and use it in GitHub Desktop.
path 以下の .rb ファイルをすべて require する
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
def dir_require(path) | |
Dir.glob("#{path}/*.rb", &method(:require)) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment