Class: VagrantPlugins::Proxmox::Action::IsStopped

Inherits:
ProxmoxAction
  • Object
show all
Defined in:
lib/vagrant-proxmox/action/is_stopped.rb

Overview

set env to :stopped

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ IsStopped

Returns a new instance of IsStopped.



8
9
10
# File 'lib/vagrant-proxmox/action/is_stopped.rb', line 8

def initialize app, env
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



12
13
14
15
# File 'lib/vagrant-proxmox/action/is_stopped.rb', line 12

def call env
      env[:result] = env[:machine].state.id == :stopped
	next_action env
end