Sha256: 8af670ecf9b9e946117ef9c77e1ea4959087746c0005a3573bcbdd4b895f8539

Contents?: true

Size: 290 Bytes

Versions: 8

Compression:

Stored size: 290 Bytes

Contents

require 'securerandom'

module FakeSQS
  class Message

    attr_reader :body

    def initialize(options = {})
      @body = options.fetch("MessageBody")
    end

    def id
      @id ||= SecureRandom.uuid
    end

    def md5
      @md5 ||= Digest::MD5.hexdigest(body)
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fake_sqs-0.0.9 lib/fake_sqs/message.rb
fake_sqs-0.0.8 lib/fake_sqs/message.rb
fake_sqs-0.0.7 lib/fake_sqs/message.rb
fake_sqs-0.0.6 lib/fake_sqs/message.rb
fake_sqs-0.0.5 lib/fake_sqs/message.rb
fake_sqs-0.0.4 lib/fake_sqs/message.rb
fake_sqs-0.0.3 lib/fake_sqs/message.rb
fake_sqs-0.0.2 lib/fake_sqs/message.rb