Sha256: f3341e5bbec5287eff294455578a6dbd92a0376e2821418661438fa71602ff41

Contents?: true

Size: 412 Bytes

Versions: 57

Compression:

Stored size: 412 Bytes

Contents

module VagrantPlugins
  module MCS
    module Action
      # This can be used with "Call" built-in to check if the machine
      # is created and branch in the middleware.
      class IsCreated
        def initialize(app, env)
          @app = app
        end

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

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
vagrant-mcs-0.8.39 lib/vagrant-mcs/action/is_created.rb
vagrant-mcs-0.8.38 lib/vagrant-mcs/action/is_created.rb
vagrant-mcs-0.8.37 lib/vagrant-mcs/action/is_created.rb
vagrant-mcs-0.8.36 lib/vagrant-mcs/action/is_created.rb
vagrant-mcs-0.8.35 lib/vagrant-mcs/action/is_created.rb
vagrant-mcs-0.8.34 lib/vagrant-mcs/action/is_created.rb
vagrant-mcs-0.8.33 lib/vagrant-mcs/action/is_created.rb
vagrant-mcs-0.8.32 lib/vagrant-mcs/action/is_created.rb
vagrant-mcs-0.8.31 lib/vagrant-mcs/action/is_created.rb
vagrant-mcs-0.8.30 lib/vagrant-mcs/action/is_created.rb
vagrant-mcs-0.8.29 lib/vagrant-mcs/action/is_created.rb
vagrant-mcs-0.8.28 lib/vagrant-mcs/action/is_created.rb
vagrant-mcs-0.8.27 lib/vagrant-mcs/action/is_created.rb
vagrant-mcs-0.8.26 lib/vagrant-mcs/action/is_created.rb
vagrant-mcs-0.8.25 lib/vagrant-mcs/action/is_created.rb
vagrant-mcs-0.8.24 lib/vagrant-mcs/action/is_created.rb
vagrant-mcs-0.8.23 lib/vagrant-mcs/action/is_created.rb
vagrant-mcs-0.8.22 lib/vagrant-mcs/action/is_created.rb
vagrant-mcs-0.8.21 lib/vagrant-mcs/action/is_created.rb
vagrant-mcs-0.8.20 lib/vagrant-mcs/action/is_created.rb