Class: Factor::Connector::ServiceManager
- Inherits:
-
Object
- Object
- Factor::Connector::ServiceManager
- Defined in:
- lib/service_manager.rb
Instance Attribute Summary collapse
-
#definition ⇒ Object
Returns the value of attribute definition.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#definition ⇒ Object
Returns the value of attribute definition.
11 12 13 |
# File 'lib/service_manager.rb', line 11 def definition @definition end |
Class Method Details
.load(filename) ⇒ Object
22 23 24 25 26 |
# File 'lib/service_manager.rb', line 22 def self.load(filename) dsl = new dsl.instance_eval(File.read(filename)) dsl end |
Instance Method Details
#instance ⇒ Object
17 18 19 20 |
# File 'lib/service_manager.rb', line 17 def instance instance = Factor::Connector::ServiceInstance.new(definition: @definition) instance end |
#service(id, &block) ⇒ Object
13 14 15 |
# File 'lib/service_manager.rb', line 13 def service(id, &block) @definition = Factor::Connector::ServiceBuilder.new(id, &block).build end |