Sha256: 7770c60f8c2b279986d9d5e6da5ba9b988fad0ae24f93b7cc4542ea50d83a1f3

Contents?: true

Size: 394 Bytes

Versions: 3

Compression:

Stored size: 394 Bytes

Contents

require 'builder'
require 'securerandom'

module FakeSQS
  class Responder

    def call(name, &block)
      xml = Builder::XmlMarkup.new()
      xml.tag! "#{name}Response" do
        if block
          xml.tag! "#{name}Result" do
            yield xml
          end
        end
        xml.ResponseMetadata do
          xml.RequestId SecureRandom.uuid
        end
      end
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fake_sqs-0.4.3 lib/fake_sqs/responder.rb
fake_sqs-0.4.2 lib/fake_sqs/responder.rb
fake_sqs-0.4.1 lib/fake_sqs/responder.rb