Class: VagrantPlugins::Skytap::Action::SuspendVm
- Defined in:
- lib/vagrant-skytap/action/suspend_vm.rb
Overview
Suspends the Skytap VM and waits until suspended.
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ SuspendVm
constructor
A new instance of SuspendVm.
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
#env ⇒ Object (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 |