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.
426 427 428 429 430 431 |
# File 'lib/conan/manifest_builder.rb', line 426 def initialize(env_id) #super({}) @id = env_id @deployments = [] @org_holder = nil end |
Instance Attribute Details
#deployments ⇒ Object
Returns the value of attribute deployments.
424 425 426 |
# File 'lib/conan/manifest_builder.rb', line 424 def deployments @deployments end |
#id ⇒ Object
Returns the value of attribute id.
424 425 426 |
# File 'lib/conan/manifest_builder.rb', line 424 def id @id end |
#upstream_env ⇒ Object
Returns the value of attribute upstream_env.
424 425 426 |
# File 'lib/conan/manifest_builder.rb', line 424 def upstream_env @upstream_env end |
Instance Method Details
#deploy(ship, &block) ⇒ Object
442 443 444 445 446 |
# File 'lib/conan/manifest_builder.rb', line 442 def deploy(ship, &block) d = Deployment.new(self, @org_holder, ship) d.instance_eval(&block) @deployments << d end |
#org(org_name, &block) ⇒ Object
437 438 439 440 |
# File 'lib/conan/manifest_builder.rb', line 437 def org(org_name, &block) @org_holder = org_name self.instance_eval(&block) end |
#promotes_from(env_id) ⇒ Object
433 434 435 |
# File 'lib/conan/manifest_builder.rb', line 433 def promotes_from(env_id) @upstream_env = env_id end |