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.
6 7 8 9 10 |
# File 'lib/vagrant/action/builtin/message.rb', line 6 def initialize(app, env, , **opts) @app = app @message = @opts = opts end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# 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 |