Class: DependencyInjection::Loaders::Yaml
- Inherits:
-
Object
- Object
- DependencyInjection::Loaders::Yaml
- Defined in:
- lib/dependency_injection/loaders/yaml.rb
Instance Method Summary collapse
-
#initialize(container) ⇒ Yaml
constructor
A new instance of Yaml.
- #load(filename) ⇒ Object
Constructor Details
#initialize(container) ⇒ Yaml
Returns a new instance of Yaml.
7 8 9 |
# File 'lib/dependency_injection/loaders/yaml.rb', line 7 def initialize(container) @container = container end |
Instance Method Details
#load(filename) ⇒ Object
11 12 13 14 15 |
# File 'lib/dependency_injection/loaders/yaml.rb', line 11 def load(filename) file = load_file(filename) add_parameters(file['parameters']) if file['parameters'] add_services(file['services']) if file['services'] end |