class Syntropy::ModuleLoader
def load_module(ref)
def load_module(ref) fn = File.expand_path(File.join(@root, "#{ref}.rb")) @fn_map[fn] = ref raise "File not found #{fn}" if !File.file?(fn) mod_body = IO.read(fn) mod_ctx = Class.new(Syntropy::Module) mod_ctx.prepare(loader: self, env: @env) mod_ctx.module_eval(mod_body, fn, 1) export_value = mod_ctx.__export_value__ wrap_module(mod_ctx, export_value) end