lib/fake_sqs/message.rb in fake_sqs-0.4.1 vs lib/fake_sqs/message.rb in fake_sqs-0.4.2
- old
+ new
@@ -1,6 +1,7 @@
require 'securerandom'
+require 'digest/sha1'
module FakeSQS
class Message
attr_reader :body, :id, :md5, :delay_seconds, :approximate_receive_count,
@@ -48,9 +49,13 @@
"SenderId" => sender_id,
"ApproximateFirstReceiveTimestamp" => approximate_first_receive_timestamp,
"ApproximateReceiveCount"=> approximate_receive_count,
"SentTimestamp"=> sent_timestamp
}
+ end
+
+ def receipt
+ Digest::SHA1.hexdigest self.id
end
end
end