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.
4 5 6 7 |
# File 'lib/require_loader.rb', line 4 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.
2 3 4 |
# File 'lib/require_loader.rb', line 2 def sym @sym end |
Instance Method Details
#call(mod) ⇒ Object
9 10 11 12 |
# File 'lib/require_loader.rb', line 9 def call(mod) @paths.each { |filename| mod.send(method, filename) } nil end |