Class: Syntropy::ModuleLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/syntropy/module.rb

Instance Method Summary collapse

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