Class: VagrantPlugins::Skytap::Action::SuspendVm

Inherits:
Object
  • Object
show all
Includes:
ActionHelpers
Defined in:
lib/vagrant-skytap/action/suspend_vm.rb

Overview

Suspends the Skytap VM and waits until suspended.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ActionHelpers

#current_vm

Constructor Details

#initialize(app, env) ⇒ SuspendVm



44
45
46
47
48
# File 'lib/vagrant-skytap/action/suspend_vm.rb', line 44

def initialize(app, env)
  @app = app
  @env = env
  @logger = Log4r::Logger.new("vagrant_skytap::action::suspend_vm")
end

Instance Attribute Details

#envObject (readonly)

Returns the value of attribute env.



42
43
44
# File 'lib/vagrant-skytap/action/suspend_vm.rb', line 42

def env
  @env
end

Instance Method Details

#call(env) ⇒ Object



50
51
52
53
# File 'lib/vagrant-skytap/action/suspend_vm.rb', line 50

def call(env)
  current_vm(env).suspend!
  @app.call(env)
end