Class: VagrantPlugins::ProviderZone::Action::Halt

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-zones/action/halt.rb

Overview

This will halt the zone

Instance Method Summary collapse

Constructor Details

#initialize(app, _env) ⇒ Halt

Returns a new instance of Halt.



10
11
12
13
# File 'lib/vagrant-zones/action/halt.rb', line 10

def initialize(app, _env)
  @logger = Log4r::Logger.new('vagrant_zones::action::import')
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



15
16
17
18
19
20
# File 'lib/vagrant-zones/action/halt.rb', line 15

def call(env)
  @machine = env[:machine]
  @driver  = @machine.provider.driver
  @driver.halt(env[:ui])
  @app.call(env)
end