Sha256: 8a7d7ce8a270feeb4f67a3c5f7a5c37c56eb575e663a1bd09346ad5abc60edda

Contents?: true

Size: 402 Bytes

Versions: 64

Compression:

Stored size: 402 Bytes

Contents

module DispatchRider
  module QueueServices
    class AwsSqs < Base
      class MessageBodyExtractor
        attr_reader :parsed_message

        def initialize(raw_message)
          @parsed_message = JSON.parse(raw_message.body)
        end

        def extract
          parsed_message.has_key?("Message") ? parsed_message["Message"] : parsed_message.to_json
        end
      end
    end
  end
end

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
dispatch-rider-2.1.0 lib/dispatch-rider/queue_services/aws_sqs/message_body_extractor.rb
dispatch-rider-2.0.0 lib/dispatch-rider/queue_services/aws_sqs/message_body_extractor.rb
dispatch-rider-1.9.0 lib/dispatch-rider/queue_services/aws_sqs/message_body_extractor.rb
dispatch-rider-1.8.6 lib/dispatch-rider/queue_services/aws_sqs/message_body_extractor.rb
dispatch-rider-1.8.5 lib/dispatch-rider/queue_services/aws_sqs/message_body_extractor.rb
dispatch-rider-1.8.4 lib/dispatch-rider/queue_services/aws_sqs/message_body_extractor.rb
dispatch-rider-1.8.3 lib/dispatch-rider/queue_services/aws_sqs/message_body_extractor.rb
dispatch-rider-1.8.2 lib/dispatch-rider/queue_services/aws_sqs/message_body_extractor.rb
dispatch-rider-1.8.1 lib/dispatch-rider/queue_services/aws_sqs/message_body_extractor.rb
dispatch-rider-1.8.0 lib/dispatch-rider/queue_services/aws_sqs/message_body_extractor.rb
dispatch-rider-1.7.2 lib/dispatch-rider/queue_services/aws_sqs/message_body_extractor.rb
dispatch-rider-1.7.1 lib/dispatch-rider/queue_services/aws_sqs/message_body_extractor.rb
dispatch-rider-1.7.0 lib/dispatch-rider/queue_services/aws_sqs/message_body_extractor.rb
dispatch-rider-1.6.2 lib/dispatch-rider/queue_services/aws_sqs/message_body_extractor.rb
dispatch-rider-1.6.1 lib/dispatch-rider/queue_services/aws_sqs/message_body_extractor.rb
dispatch-rider-1.6.0 lib/dispatch-rider/queue_services/aws_sqs/message_body_extractor.rb
dispatch-rider-1.5.3 lib/dispatch-rider/queue_services/aws_sqs/message_body_extractor.rb
dispatch-rider-1.5.2 lib/dispatch-rider/queue_services/aws_sqs/message_body_extractor.rb
dispatch-rider-1.5.1 lib/dispatch-rider/queue_services/aws_sqs/message_body_extractor.rb
dispatch-rider-1.5.0 lib/dispatch-rider/queue_services/aws_sqs/message_body_extractor.rb