Mitchell Hashimoto 5eed3b8417 Building up the destroy action again using new provider API.
This shows me moving the built-in middleware sequences to the provider
and how I'm organizing all that.
2012-07-26 22:39:27 -07:00

23 lines
596 B
Ruby

module VagrantPlugins
module ProviderVirtualBox
module Action
# Checks that VirtualBox is installed and ready to be used.
class CheckVirtualbox
def initialize(app, env)
@app = app
end
def call(env)
# This verifies that VirtualBox is installed and the driver is
# ready to function. If not, then an exception will be raised
# which will break us out of execution of the middleware sequence.
Driver::Meta.new.verify!
# Carry on.
@app.call(env)
end
end
end
end
end