Class: Environment
- Inherits:
-
Object
- Object
- Environment
- Defined in:
- lib/conan/environment.rb
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.
4 5 6 7 8 |
# File 'lib/conan/environment.rb', line 4 def initialize(env_id) @id = env_id @deployments = [] @org_holder = nil end |
Instance Attribute Details
#deployments ⇒ Object
Returns the value of attribute deployments.
2 3 4 |
# File 'lib/conan/environment.rb', line 2 def deployments @deployments end |
#id ⇒ Object
Returns the value of attribute id.
2 3 4 |
# File 'lib/conan/environment.rb', line 2 def id @id end |
#upstream_env ⇒ Object
Returns the value of attribute upstream_env.
2 3 4 |
# File 'lib/conan/environment.rb', line 2 def upstream_env @upstream_env end |
Instance Method Details
#deploy(ship, &block) ⇒ Object
19 20 21 22 23 |
# File 'lib/conan/environment.rb', line 19 def deploy(ship, &block) d = Deployment.new(self, @org_holder, ship) d.instance_eval(&block) @deployments << d end |
#org(org_name, &block) ⇒ Object
14 15 16 17 |
# File 'lib/conan/environment.rb', line 14 def org(org_name, &block) @org_holder = org_name self.instance_eval(&block) end |
#promotes_from(env_id) ⇒ Object
10 11 12 |
# File 'lib/conan/environment.rb', line 10 def promotes_from(env_id) @upstream_env = env_id end |