Sha256: 13a93a85968323ef09bd3b890ba48009eb2825d9322fca0875f3b8959d772c4f

Contents?: true

Size: 399 Bytes

Versions: 7

Compression:

Stored size: 399 Bytes

Contents

module VagrantPlugins
  module XHYVE
    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].id != nil
          @app.call(env)
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
vagrant-xhyve-0.4.1 lib/vagrant-xhyve/action/is_created.rb
vagrant-xhyve-0.4.0 lib/vagrant-xhyve/action/is_created.rb
vagrant-xhyve-0.3.0 lib/vagrant-xhyve/action/is_created.rb
vagrant-xhyve-0.2.0 lib/vagrant-xhyve/action/is_created.rb
vagrant-xhyve-0.1.1 lib/vagrant-xhyve/action/is_created.rb
vagrant-xhyve-0.1.1.pre lib/vagrant-xhyve/action/is_created.rb
vagrant-xhyve-0.1.0.pre lib/vagrant-xhyve/action/is_created.rb