Class: Deploy::Run

Inherits:
Object
  • Object
show all
Defined in:
lib/dew/models/deploy/run.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(deploy_type, environment, opts) ⇒ Run

Returns a new instance of Run.



9
10
11
12
13
# File 'lib/dew/models/deploy/run.rb', line 9

def initialize deploy_type, environment, opts
  @deploy_type = deploy_type
  @environment = environment
  @opts = opts
end

Instance Attribute Details

#deploy_typeObject (readonly)

Returns the value of attribute deploy_type.



7
8
9
# File 'lib/dew/models/deploy/run.rb', line 7

def deploy_type
  @deploy_type
end

#environmentObject (readonly)

Returns the value of attribute environment.



7
8
9
# File 'lib/dew/models/deploy/run.rb', line 7

def environment
  @environment
end

#optsObject (readonly)

Returns the value of attribute opts.



7
8
9
# File 'lib/dew/models/deploy/run.rb', line 7

def opts
  @opts
end

Instance Method Details

#deployObject



15
16
17
# File 'lib/dew/models/deploy/run.rb', line 15

def deploy
  Deploy.const_get(deploy_type.capitalize).new(@environment.servers, @opts).deploy
end