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.



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

#deploymentsObject

Returns the value of attribute deployments.



424
425
426
# File 'lib/conan/manifest_builder.rb', line 424

def deployments
  @deployments
end

#idObject

Returns the value of attribute id.



424
425
426
# File 'lib/conan/manifest_builder.rb', line 424

def id
  @id
end

#upstream_envObject

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