Module: Loader::Api
- Defined in:
- lib/modules/loader.rb
Class Method Summary collapse
Class Method Details
.config(opts) ⇒ Object
76 77 78 79 80 81 82 83 |
# File 'lib/modules/loader.rb', line 76 def self.config(opts) [ :basepath, :save_the_environment, ].each do |opt| Loader.instance_variable_set("@#{opt}", opts[opt]) if opts.include?(opt) end end |
.export(name = nil, value = nil) ⇒ Object
66 67 68 69 70 71 72 73 74 |
# File 'lib/modules/loader.rb', line 66 def self.export(name=nil, value=nil) if name.nil? value = yield else value = {name => value} end Loader.export(value) end |
.import(id, type = nil) ⇒ Object
62 63 64 |
# File 'lib/modules/loader.rb', line 62 def self.import(id, type=nil) Loader.import(id, type) end |