Sha256: 42dc373a18aeed0037117f144164342a57ca50a36c58436ff301e2f7176d6c28

Contents?: true

Size: 499 Bytes

Versions: 54

Compression:

Stored size: 499 Bytes

Contents

# frozen_string_literal: true

require 'log4r'

module VagrantPlugins
  module ProviderZone
    module Action
      # This will halt the zone
      class Halt
        def initialize(app, _env)
          @logger = Log4r::Logger.new('vagrant_zones::action::import')
          @app = app
        end

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

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
vagrant-zones-0.1.55 lib/vagrant-zones/action/halt.rb
vagrant-zones-0.1.54 lib/vagrant-zones/action/halt.rb
vagrant-zones-0.1.52 lib/vagrant-zones/action/halt.rb
vagrant-zones-0.1.48 lib/vagrant-zones/action/halt.rb
vagrant-zones-0.1.46 lib/vagrant-zones/action/halt.rb
vagrant-zones-0.1.44 lib/vagrant-zones/action/halt.rb
vagrant-zones-0.1.12 lib/vagrant-zones/action/halt.rb
vagrant-zones-0.1.10 lib/vagrant-zones/action/halt.rb
vagrant-zones-0.1.9 lib/vagrant-zones/action/halt.rb
vagrant-zones-0.1.8 lib/vagrant-zones/action/halt.rb
vagrant-zones-0.1.41 lib/vagrant-zones/action/halt.rb
vagrant-zones-0.1.3 lib/vagrant-zones/action/halt.rb
vagrant-zones-0.0.12 lib/vagrant-zones/action/halt.rb
vagrant-zones-0.0.1 lib/vagrant-zones/action/halt.rb