Class: Environment
- Inherits:
-
Object
- Object
- Environment
- Defined in:
- lib/conan/manifest_builder.rb
Overview
< HasOptions
Instance Attribute Summary collapse
-
#deployments ⇒ Object
Returns the value of attribute deployments.
-
#id ⇒ Object
Returns the value of attribute id.
-
#upstream_env ⇒ Object
Returns the value of attribute upstream_env.
Instance Method Summary collapse
- #deploy(ship, &block) ⇒ Object
-
#initialize(env_id) ⇒ Environment
constructor
A new instance of Environment.
- #org(org_name, &block) ⇒ Object
- #promotes_from(env_id) ⇒ Object
Constructor Details
#initialize(env_id) ⇒ Environment
Returns a new instance of Environment.
393 394 395 396 397 398 |
# File 'lib/conan/manifest_builder.rb', line 393 def initialize(env_id) #super({}) @id = env_id @deployments = [] @org_holder = nil end |
Instance Attribute Details
#deployments ⇒ Object
Returns the value of attribute deployments.
391 392 393 |
# File 'lib/conan/manifest_builder.rb', line 391 def deployments @deployments end |
#id ⇒ Object
Returns the value of attribute id.
391 392 393 |
# File 'lib/conan/manifest_builder.rb', line 391 def id @id end |
#upstream_env ⇒ Object
Returns the value of attribute upstream_env.
391 392 393 |
# File 'lib/conan/manifest_builder.rb', line 391 def upstream_env @upstream_env end |
Instance Method Details
#deploy(ship, &block) ⇒ Object
409 410 411 412 413 |
# File 'lib/conan/manifest_builder.rb', line 409 def deploy(ship, &block) d = Deployment.new(self, @org_holder, ship) d.instance_eval(&block) @deployments << d end |
#org(org_name, &block) ⇒ Object
404 405 406 407 |
# File 'lib/conan/manifest_builder.rb', line 404 def org(org_name, &block) @org_holder = org_name self.instance_eval(&block) end |
#promotes_from(env_id) ⇒ Object
400 401 402 |
# File 'lib/conan/manifest_builder.rb', line 400 def promotes_from(env_id) @upstream_env = env_id end |