Class: SparseImage::Destroy

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-sparseimage.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ Destroy

Shutdown hook Unmount the shared drive from the host machine and delete it. Confirm with the user first.



229
230
231
232
# File 'lib/vagrant-sparseimage.rb', line 229

def initialize(app, env)
	@app = app
	@env = env
end

Instance Method Details

#call(env) ⇒ Object



233
234
235
236
237
# File 'lib/vagrant-sparseimage.rb', line 233

def call(env)
	vm = env[:machine]
	SparseImage::destroy(vm)
	@app.call(env)
end