Class: RubyDeployer::ProvisionDSL

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ ProvisionDSL

Returns a new instance of ProvisionDSL.



7
8
9
# File 'lib/ruby_deployer/provision_dsl.rb', line 7

def initialize options
  @instances = []
end

Instance Attribute Details

#instancesObject (readonly)

Returns the value of attribute instances.



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

def instances
  @instances
end

Instance Method Details

#execute(&block) ⇒ Object



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

def execute(&block)
  instance_eval &block
end

#instance(name, options = {}, &block) ⇒ Object



11
12
13
# File 'lib/ruby_deployer/provision_dsl.rb', line 11

def instance(name, options={}, &block)
  @instances << Instance.new(name, options)
end