class VagrantPlugins::ProviderLibvirt::Action::IsCreated
This can be used with “Call” built-in to check if the machine is created and branch in the middleware.
Public Class Methods
new(app, _env)
click to toggle source
# File lib/vagrant-libvirt/action/is_created.rb, line 8 def initialize(app, _env) @app = app end
Public Instance Methods
call(env)
click to toggle source
# File lib/vagrant-libvirt/action/is_created.rb, line 12 def call(env) env[:result] = env[:machine].state.id != :not_created @app.call(env) end