Class: VagrantPlugins::VCenter::Action::MessageWillNotDestroy

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-vcenter/action/message_will_not_destroy.rb

Overview

Prints out a message that the VM will not be destroyed.

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ MessageWillNotDestroy

Returns a new instance of MessageWillNotDestroy.



6
7
8
# File 'lib/vagrant-vcenter/action/message_will_not_destroy.rb', line 6

def initialize(app, env)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



10
11
12
13
14
# File 'lib/vagrant-vcenter/action/message_will_not_destroy.rb', line 10

def call(env)
  env[:ui].info(I18n.t('vagrant_vcenter.power.will_not_destroy',
                       name: env[:machine].name))
  @app.call(env)
end