Sha256: 3f07ec818b6553a80a99b4d092c81154ee77d96e2bc4d61f2f30cb5e941d4507

Contents?: true

Size: 376 Bytes

Versions: 61

Compression:

Stored size: 376 Bytes

Contents

module Vagrant
  class Action
    module VM
      class Suspend
        def initialize(app, env)
          @app = app
        end

        def call(env)
          if env["vm"].vm.running?
            env.ui.info I18n.t("vagrant.actions.vm.suspend.suspending")
            env["vm"].vm.save_state
          end

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

Version data entries

61 entries across 61 versions & 5 rubygems

Version Path
vagrantup-0.8.9 lib/vagrant/action/vm/suspend.rb
vagrantup-0.8.8 lib/vagrant/action/vm/suspend.rb
vagrantup-0.8.7 lib/vagrant/action/vm/suspend.rb
vagrantup-0.8.6 lib/vagrant/action/vm/suspend.rb
vagrantup-0.8.5 lib/vagrant/action/vm/suspend.rb
vagrantup-0.8.4 lib/vagrant/action/vm/suspend.rb
vagrantup-0.8.3 lib/vagrant/action/vm/suspend.rb
vagrantup-0.8.2 lib/vagrant/action/vm/suspend.rb
vagrantup-0.8.10 lib/vagrant/action/vm/suspend.rb
vagrantup-0.8.1 lib/vagrant/action/vm/suspend.rb
vagrantup-0.8.0 lib/vagrant/action/vm/suspend.rb
vagrantup-0.7.8 lib/vagrant/action/vm/suspend.rb
vagrantup-0.7.7 lib/vagrant/action/vm/suspend.rb
vagrantup-0.7.6 lib/vagrant/action/vm/suspend.rb
vagrantup-0.7.5 lib/vagrant/action/vm/suspend.rb
vagrantup-0.7.4 lib/vagrant/action/vm/suspend.rb
vagrantup-0.7.3 lib/vagrant/action/vm/suspend.rb
vagrantup-0.7.2 lib/vagrant/action/vm/suspend.rb
vagrantup-0.7.1 lib/vagrant/action/vm/suspend.rb
vagrantup-0.7.0 lib/vagrant/action/vm/suspend.rb