Sha256: 940dafc05b78d688a1a1d0367d1723ed6415ac372691a521d10ebac5318a4d47

Contents?: true

Size: 402 Bytes

Versions: 1

Compression:

Stored size: 402 Bytes

Contents

module VagrantPlugins
  module HYPERKIT
    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

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-hyperkit-0.4.3 lib/vagrant-hyperkit/action/is_created.rb