Sha256: 51fe0ca260329a664dbce17df2cbb36ca91fb630e650dbdef977494699c9ba77
Contents?: true
Size: 662 Bytes
Versions: 10
Compression:
Stored size: 662 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.add_queue_attributes(results) @queues.save(queue) @responder.call :SetQueueAttributes end end end end
Version data entries
10 entries across 10 versions & 1 rubygems