Class: RubyDeployer::DeploymentDSL

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_deployer/deployment_dsl.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDeploymentDSL

Returns a new instance of DeploymentDSL.



5
6
7
# File 'lib/ruby_deployer/deployment_dsl.rb', line 5

def initialize
  @deployments = {}
end

Instance Attribute Details

#deploymentsObject (readonly)

Returns the value of attribute deployments.



3
4
5
# File 'lib/ruby_deployer/deployment_dsl.rb', line 3

def deployments
  @deployments
end

Instance Method Details

#execute(&block) ⇒ Object



15
16
17
# File 'lib/ruby_deployer/deployment_dsl.rb', line 15

def execute(&block)
  instance_eval &block
end

#push(options) ⇒ Object



9
10
11
12
13
# File 'lib/ruby_deployer/deployment_dsl.rb', line 9

def push(options)
  options.each do |artifact, destinations|
    @deployments[artifact] = destinations
  end
end