vagrant-lxc-ng/lib/vagrant-backports/action/message.rb
2014-03-13 00:57:36 -03:00

20 lines
452 B
Ruby

module Vagrant
module Backports
module Action
# This middleware simply outputs a message to the UI.
class Message
def initialize(app, env, message, **opts)
@app = app
@message = message
end
def call(env)
env[:ui].info(@message)
@app.call(env)
end
end
end
end
end
Vagrant::Action::Builtin.const_set :Message, Vagrant::Backports::Action::Message