Class: VagrantPlugins::Rimu::Actions::IsStopped

Inherits:
AbstractAction show all
Defined in:
lib/vagrant-rimu/actions/is_stopped.rb

Instance Method Summary collapse

Methods inherited from AbstractAction

#call

Constructor Details

#initialize(app, _env) ⇒ IsStopped

Returns a new instance of IsStopped.



7
8
9
# File 'lib/vagrant-rimu/actions/is_stopped.rb', line 7

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

Instance Method Details

#execute(env) ⇒ Object



11
12
13
14
15
# File 'lib/vagrant-rimu/actions/is_stopped.rb', line 11

def execute(env)
  env[:result] = env[:machine].state.id == :off

  @app.call(env)
end