Class: Requirium::RequireLoader
- Inherits:
-
Object
- Object
- Requirium::RequireLoader
- Defined in:
- lib/require_loader.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#sym ⇒ Object
readonly
Returns the value of attribute sym.
Instance Method Summary collapse
- #call(mod) ⇒ Object
-
#initialize(sym, paths, dirname = nil) ⇒ RequireLoader
constructor
A new instance of RequireLoader.
Constructor Details
#initialize(sym, paths, dirname = nil) ⇒ RequireLoader
Returns a new instance of RequireLoader.
5 6 7 8 |
# File 'lib/require_loader.rb', line 5 def initialize(sym, paths, dirname = nil) @sym = sym @paths = clean_paths(paths, dirname) end |
Instance Attribute Details
#sym ⇒ Object (readonly)
Returns the value of attribute sym.
3 4 5 |
# File 'lib/require_loader.rb', line 3 def sym @sym end |
Instance Method Details
#call(mod) ⇒ Object
10 11 12 13 |
# File 'lib/require_loader.rb', line 10 def call(mod) @paths.each { |filename| mod.send(method, filename) } nil end |