Class: VagrantDestroy::RakeTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- VagrantDestroy::RakeTask
- Includes:
- DaptivChefCI::RakeTaskHelpers, Rake::DSL
- Defined in:
- lib/daptiv-chef-ci/vagrant_destroy_task.rb
Overview
Example usage, destroys a Vagrant box.
VagrantUp::RakeTask.new ‘up’ do |t|
t.destroy_timeout_in_seconds = 180
end
This class lets you define Rake tasks to drive Vagrant.
Instance Attribute Summary collapse
-
#destroy_timeout_in_seconds ⇒ Object
Returns the value of attribute destroy_timeout_in_seconds.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#vagrant_driver ⇒ Object
writeonly
Sets the attribute vagrant_driver.
Instance Method Summary collapse
-
#initialize(name = 'vagrant_destroy', desc = 'Vagrant destroy task') {|_self| ... } ⇒ RakeTask
constructor
A new instance of RakeTask.
Methods included from DaptivChefCI::RakeTaskHelpers
#execute, #exit_on_failure, #exit_on_failure=
Constructor Details
#initialize(name = 'vagrant_destroy', desc = 'Vagrant destroy task') {|_self| ... } ⇒ RakeTask
Returns a new instance of RakeTask.
27 28 29 30 31 32 33 |
# File 'lib/daptiv-chef-ci/vagrant_destroy_task.rb', line 27 def initialize(name = 'vagrant_destroy', desc = 'Vagrant destroy task') @name, @desc = name, desc @destroy_timeout_in_seconds = 180 @environment = {} yield self if block_given? define_task end |
Instance Attribute Details
#destroy_timeout_in_seconds ⇒ Object
Returns the value of attribute destroy_timeout_in_seconds.
22 23 24 |
# File 'lib/daptiv-chef-ci/vagrant_destroy_task.rb', line 22 def destroy_timeout_in_seconds @destroy_timeout_in_seconds end |
#environment ⇒ Object
Returns the value of attribute environment.
23 24 25 |
# File 'lib/daptiv-chef-ci/vagrant_destroy_task.rb', line 23 def environment @environment end |
#vagrant_driver=(value) ⇒ Object
Sets the attribute vagrant_driver
21 22 23 |
# File 'lib/daptiv-chef-ci/vagrant_destroy_task.rb', line 21 def vagrant_driver=(value) @vagrant_driver = value end |