Top Level Namespace
Defined Under Namespace
Modules: Shelter Classes: String
Constant Summary collapse
- LIB_ROOT =
File.('../', __FILE__)
Instance Method Summary collapse
Instance Method Details
#require_all(dir) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/shelter.rb', line 28 def require_all(dir) path = File.join(dir, '*') later = [] Dir.glob(path).each do |file| require file if File.file?(file) later << file if File.directory?(file) end # Require subdirs later.each do |file| require_all(file) end end |