Class: VagrantPlugins::VSphere::Action::IsRunning
- Inherits:
-
Object
- Object
- VagrantPlugins::VSphere::Action::IsRunning
- Includes:
- Util::MachineHelpers
- Defined in:
- lib/vSphere/action/is_running.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, _env) ⇒ IsRunning
constructor
A new instance of IsRunning.
Methods included from Util::MachineHelpers
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 |