Class: VagrantPlugins::Skytap::Action::SuspendEnvironment

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

Overview

Suspends the Skytap environment and waits until suspended.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ SuspendEnvironment

Returns a new instance of SuspendEnvironment.


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

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

Instance Attribute Details

#envObject (readonly)

Returns the value of attribute env


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

def env
  @env
end

Instance Method Details

#call(env) ⇒ Object


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

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