Sha256: 1746b3f32e511dafa9b425f1d0a5f118daefd6a1dde5e52a40bc2cadf95fb367

Contents?: true

Size: 420 Bytes

Versions: 31

Compression:

Stored size: 420 Bytes

Contents

module VagrantPlugins
  module Parallels
    module Action
      class Suspend
        def initialize(app, env)
          @app = app
        end

        def call(env)
          if env[:machine].state.id == :running
            env[:ui].info I18n.t('vagrant.actions.vm.suspend.suspending')
            env[:machine].provider.driver.suspend
          end

          @app.call(env)
        end
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
vagrant-parallels-1.7.3 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.7.2 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.7.1 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.7.0 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.6.3 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.6.2 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.6.1 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.6.0 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.5.1 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.5.0 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.4.3 lib/vagrant-parallels/action/suspend.rb