Sha256: 6ff44cd1803dc682580917471da4b6a3e3ba6314becd18db2b7a4ad84465eb83
Contents?: true
Size: 631 Bytes
Versions: 1
Compression:
Stored size: 631 Bytes
Contents
module FakeSQS module Actions class SetQueueAttributes 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) results = {} params.each do |key, value| if key =~ /\AAttribute\.(\d+)\.Name\z/ results[value] = params.fetch("Attribute.#{$1}.Value") end end queue.attributes.merge!(results) @responder.call :SetQueueAttributes end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fake_sqs-0.0.8 | lib/fake_sqs/actions/set_queue_attributes.rb |