Class: Servitor::ServiceDefinition
- Inherits:
-
Object
- Object
- Servitor::ServiceDefinition
- Defined in:
- lib/service/service_definition/service_definition.rb
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
these are derived at load time.
-
#service_root ⇒ Object
readonly
these are derived at load time.
Instance Method Summary collapse
- #configuration(&block) ⇒ Object
- #deployment_stages(*args, &block) ⇒ Object
- #infrastructure_requirements(&block) ⇒ Object
-
#initialize(location = nil, service_root = nil) ⇒ ServiceDefinition
constructor
A new instance of ServiceDefinition.
Constructor Details
#initialize(location = nil, service_root = nil) ⇒ ServiceDefinition
Returns a new instance of ServiceDefinition.
24 25 26 27 28 29 30 31 |
# File 'lib/service/service_definition/service_definition.rb', line 24 def initialize(location=nil, service_root=nil) @location = location @service_root = service_root @depends_on = [] @deployment_stages = DeploymentStages.new @infrastructure_requirements = InfrastructureRequirements.new @configuration = ServiceConfiguration.new end |
Instance Attribute Details
#location ⇒ Object (readonly)
these are derived at load time
22 23 24 |
# File 'lib/service/service_definition/service_definition.rb', line 22 def location @location end |
#service_root ⇒ Object (readonly)
these are derived at load time
22 23 24 |
# File 'lib/service/service_definition/service_definition.rb', line 22 def service_root @service_root end |
Instance Method Details
#configuration(&block) ⇒ Object
43 44 45 46 |
# File 'lib/service/service_definition/service_definition.rb', line 43 def configuration(&block) @configuration.instance_exec(&block) if block_given? @configuration end |
#deployment_stages(*args, &block) ⇒ Object
33 34 35 36 |
# File 'lib/service/service_definition/service_definition.rb', line 33 def deployment_stages(*args, &block) @deployment_stages.instance_exec(&block) if block_given? @deployment_stages end |
#infrastructure_requirements(&block) ⇒ Object
38 39 40 41 |
# File 'lib/service/service_definition/service_definition.rb', line 38 def infrastructure_requirements(&block) @infrastructure_requirements.instance_exec(&block) if block_given? @infrastructure_requirements end |