Class: VagrantPlugins::VSphere::Action::IsRunning

Inherits:
Object
  • Object
show all
Includes:
Util::MachineHelpers
Defined in:
lib/vSphere/action/is_running.rb

Instance Method Summary collapse

Methods included from Util::MachineHelpers

#wait_for_ssh

Constructor Details

#initialize(app, _env) ⇒ IsRunning

Returns a new instance of IsRunning.



9
10
11
# File 'lib/vSphere/action/is_running.rb', line 9

def initialize(app, _env)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



13
14
15
16
# File 'lib/vSphere/action/is_running.rb', line 13

def call(env)
  env[:result] = env[:machine].state.id == :running
  @app.call env
end