class Vagrant::Action::Builtin::Message

This middleware simply outputs a message to the UI.

Public Class Methods

new(app, env, message, **opts) click to toggle source
# File lib/vagrant/action/builtin/message.rb, line 6
def initialize(app, env, message, **opts)
  @app     = app
  @message = message
  @opts    = opts
end

Public Instance Methods

call(env) click to toggle source
# File lib/vagrant/action/builtin/message.rb, line 12
def call(env)
  if !@opts[:post]
    env[:ui].output(@message)
  end

  @app.call(env)

  if @opts[:post]
    env[:ui].output(@message)
  end
end