vagrant-lxc-ng/lib/vagrant-backports/action/message.rb

21 lines
452 B
Ruby
Raw Permalink Normal View History

2014-03-13 01:41:41 +00:00
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