Module: Magic::Loader
- Defined in:
- lib/magic/loader.rb,
sig/magic/loader.rbs
Overview
:nodoc:
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.require_all(scope = caller_locations[0].path) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/magic/loader.rb', line 9 def require_all scope = caller_locations[0].path Pathname(scope) .sub_ext('') .glob('*.rb') .each { require _1 } end |
Instance Method Details
#require_all(scope = caller_locations[0].path) ⇒ Array[Pathname]
9 10 11 12 13 14 |
# File 'lib/magic/loader.rb', line 9 def require_all scope = caller_locations[0].path Pathname(scope) .sub_ext('') .glob('*.rb') .each { require _1 } end |