Class: Configue::SourceLoader
- Inherits:
-
Object
- Object
- Configue::SourceLoader
- Defined in:
- lib/configue/source_loader.rb
Instance Method Summary collapse
-
#initialize(loader, sources, namespace = nil, base_namespace = nil) ⇒ SourceLoader
constructor
A new instance of SourceLoader.
- #load ⇒ Object
Constructor Details
#initialize(loader, sources, namespace = nil, base_namespace = nil) ⇒ SourceLoader
Returns a new instance of SourceLoader.
7 8 9 10 11 12 |
# File 'lib/configue/source_loader.rb', line 7 def initialize(loader, sources, namespace=nil, base_namespace=nil) @loader = loader @sources = sources @namespace = namespace.to_s if namespace @basespace = base_namespace.to_s if base_namespace end |
Instance Method Details
#load ⇒ Object
14 15 16 17 18 19 |
# File 'lib/configue/source_loader.rb', line 14 def load @sources.each do |src| src.each {|k, v| __send__("load_#{k}", v) } end @container end |