Class: Syntropy::ModuleLoader
- Inherits:
-
Object
- Object
- Syntropy::ModuleLoader
- Defined in:
- lib/syntropy/module.rb
Instance Method Summary collapse
-
#initialize(root, env) ⇒ ModuleLoader
constructor
A new instance of ModuleLoader.
- #load(ref) ⇒ Object
Constructor Details
#initialize(root, env) ⇒ ModuleLoader
Returns a new instance of ModuleLoader.
5 6 7 8 9 |
# File 'lib/syntropy/module.rb', line 5 def initialize(root, env) @root = root @env = env @loaded = {} end |
Instance Method Details
#load(ref) ⇒ Object
11 12 13 |
# File 'lib/syntropy/module.rb', line 11 def load(ref) @loaded[ref] ||= load_module(ref) end |