Class: VagrantPlugins::DockerProvider::Action::Message
- Inherits:
-
Object
- Object
- VagrantPlugins::DockerProvider::Action::Message
- Defined in:
- lib/docker-provider/action/message.rb
Overview
XXX: Is this really needed? Should we contribute this back to Vagrant’s core?
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env, msg_key, type = :info) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(app, env, msg_key, type = :info) ⇒ Message
Returns a new instance of Message.
6 7 8 9 10 |
# File 'lib/docker-provider/action/message.rb', line 6 def initialize(app, env, msg_key, type = :info) @app = app @msg_key = msg_key @type = type end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/docker-provider/action/message.rb', line 12 def call(env) machine = env[:machine] = I18n.t("docker_provider.messages.#{@msg_key}", name: machine.name) env[:ui].send @type, @app.call env end |