Sha256: 08f14da95c10ee1c2c20f7804d7d249800bd56b26dcee51132bb3affed3fc62e

Contents?: true

Size: 528 Bytes

Versions: 2

Compression:

Stored size: 528 Bytes

Contents

module FakeSQS
  module Actions
    class ChangeMessageVisibility

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

      def call(queue_name, params)
        queue = @queues.get(queue_name)
        visibility = params.fetch("VisibilityTimeout")
        receipt = params.fetch("ReceiptHandle")

        queue.change_message_visibility(receipt, visibility.to_i)

        @responder.call :ChangeMessageVisibility
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fake_sqs-0.4.3 lib/fake_sqs/actions/change_message_visibility.rb
fake_sqs-0.4.2 lib/fake_sqs/actions/change_message_visibility.rb