vaguerent/lib/vagrant/action/env/error_halt.rb
2010-07-13 21:31:06 -07:00

17 lines
308 B
Ruby

module Vagrant
class Action
module Env
# A middleware which simply halts if the environment is erroneous.
class ErrorHalt
def initialize(app,env)
@app = app
end
def call(env)
@app.call(env) if !env.error?
end
end
end
end
end