Sha256: ecaafabde4434e9633282b7eb0b1922a8604c079e3035701920ed6b3ba7ca2f4
Contents?: true
Size: 537 Bytes
Versions: 2
Compression:
Stored size: 537 Bytes
Contents
module Propono class SqsMessage include Sqs attr_reader :context, :message, :raw_message, :receipt_handle def initialize(raw_message) body = JSON.parse(raw_message["Body"])["Message"] body = JSON.parse(body) @raw_message = raw_message @context = body.symbolize_keys @message = context.delete(:message) @receipt_handle = raw_message["receipt_handle"] end def ==(other) other.is_a?(SqsMessage) && other.receipt_handle == @receipt_handle end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
propono-1.0.0.rc2 | lib/propono/components/sqs_message.rb |
propono-1.0.0.rc1 | lib/propono/components/sqs_message.rb |