Class: Vagrant::Action::Builtin::Message
- Inherits:
-
Object
- Object
- Vagrant::Action::Builtin::Message
- Defined in:
- lib/vagrant/action/builtin/message.rb
Overview
This middleware simply outputs a message to the UI.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env, message, **opts) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(app, env, message, **opts) ⇒ Message
Returns a new instance of Message.
9 10 11 12 13 |
# File 'lib/vagrant/action/builtin/message.rb', line 9 def initialize(app, env, , **opts) @app = app @message = @opts = opts end |
Instance Method Details
#call(env) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/vagrant/action/builtin/message.rb', line 15 def call(env) if !@opts[:post] env[:ui].output(@message) end @app.call(env) if @opts[:post] env[:ui].output(@message) end end |