Sha256: 2fbcae45795c7562c4a0bd3d32eab2ceb67d6369bbedc3903cb05dd5cf192757

Contents?: true

Size: 506 Bytes

Versions: 4

Compression:

Stored size: 506 Bytes

Contents

module VagrantPlugins
  module VCloudAir
    module Action
      class IsPaused
        def initialize(app, env)
          @app = app
        end

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

          # 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

4 entries across 4 versions & 1 rubygems

Version Path
vagrant-vcloudair-0.5.3 lib/vagrant-vcloudair/action/is_paused.rb
vagrant-vcloudair-0.5.2 lib/vagrant-vcloudair/action/is_paused.rb
vagrant-vcloudair-0.5.1 lib/vagrant-vcloudair/action/is_paused.rb
vagrant-vcloudair-0.5.0 lib/vagrant-vcloudair/action/is_paused.rb