Sha256: 4d17aa734fbf7cff79b1defab412aca59d3e6075e2a6c677e6c93fe06e17f697

Contents?: true

Size: 526 Bytes

Versions: 1

Compression:

Stored size: 526 Bytes

Contents

module VagrantPlugins
  module ProviderVirtualBox
    module Action
      class IsSaved
        def initialize(app, env)
          @app = app
        end

        def call(env)
          # Set the result to be true if the machine is saved.
          env[:result] = env[:machine].state.id == :saved

          # Call the next if we have one (but we shouldn't, since this
          # middleware is built to run with the Call-type middlewares)
          @app.call(env)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-cloudstack-1.2.0 vendor/bundle/bundler/gems/vagrant-c84e05fd063f/plugins/providers/virtualbox/action/is_saved.rb