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

Inherits:
Object
  • Object
show all
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

Constructor Details

#initialize(app, env) ⇒ SuspendVm

Returns a new instance of SuspendVm.



19
20
21
22
23
# File 'lib/vagrant-skytap/action/suspend_vm.rb', line 19

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.



17
18
19
# File 'lib/vagrant-skytap/action/suspend_vm.rb', line 17

def env
  @env
end

Instance Method Details

#call(env) ⇒ Object



25
26
27
28
# File 'lib/vagrant-skytap/action/suspend_vm.rb', line 25

def call(env)
  env[:environment].current_vm.suspend!
  @app.call(env)
end