Class: Environment

Inherits:
Object
  • Object
show all
Defined in:
lib/conan/manifest_builder.rb

Overview

< HasOptions

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#deploymentsObject

Returns the value of attribute deployments.



391
392
393
# File 'lib/conan/manifest_builder.rb', line 391

def deployments
  @deployments
end

#idObject

Returns the value of attribute id.



391
392
393
# File 'lib/conan/manifest_builder.rb', line 391

def id
  @id
end

#upstream_envObject

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