Sha256: 1ca201a1c311c4da77ee68ec0b18997422258dfbe1193548aa47d88b4f849dc1

Contents?: true

Size: 578 Bytes

Versions: 12

Compression:

Stored size: 578 Bytes

Contents

module FakeSQS
  module Actions
    class GetQueueAttributes

      def initialize(options = {})
        @server    = options.fetch(:server)
        @queues    = options.fetch(:queues)
        @responder = options.fetch(:responder)
      end

      def call(queue_name, params)
        queue = @queues.get(queue_name)
        @responder.call :GetQueueAttributes do |xml|
          queue.attributes.each do |name, value|
            xml.Attribute do
              xml.Name name
              xml.Value value
            end
          end
        end
      end

    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
fake_sqs-0.4.3 lib/fake_sqs/actions/get_queue_attributes.rb
fake_sqs-0.4.2 lib/fake_sqs/actions/get_queue_attributes.rb
fake_sqs-0.4.1 lib/fake_sqs/actions/get_queue_attributes.rb
fake_sqs-0.4.0 lib/fake_sqs/actions/get_queue_attributes.rb
fake_sqs-0.3.1 lib/fake_sqs/actions/get_queue_attributes.rb
fake_sqs-0.3.0 lib/fake_sqs/actions/get_queue_attributes.rb
fake_sqs-0.2.0 lib/fake_sqs/actions/get_queue_attributes.rb
fake_sqs-0.1.0 lib/fake_sqs/actions/get_queue_attributes.rb
fake_sqs-0.0.11 lib/fake_sqs/actions/get_queue_attributes.rb
fake_sqs-0.0.10 lib/fake_sqs/actions/get_queue_attributes.rb
fake_sqs-0.0.9 lib/fake_sqs/actions/get_queue_attributes.rb
fake_sqs-0.0.8 lib/fake_sqs/actions/get_queue_attributes.rb