Class: Queuel::SQS::Message
- Inherits:
-
Base::Message
- Object
- Base::Message
- Queuel::SQS::Message
- Defined in:
- lib/queuel/sqs/message.rb
Defined Under Namespace
Classes: BucketDoesNotExistError, InsufficientPermissions, NoBucketNameSupplied
Constant Summary collapse
- MAX_KNOWN_BYTE_SIZE =
256
Instance Attribute Summary
Attributes inherited from Base::Message
Instance Method Summary collapse
Methods inherited from Base::Message
#empty?, #initialize, #present?
Constructor Details
This class inherits a constructor from Queuel::Base::Message
Instance Method Details
#-(write) ⇒ Object
59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/queuel/sqs/message.rb', line 59 def s3_transaction(method, *args) bucket_name = [:s3_bucket_name] raise NoBucketNameSupplied if bucket_name.nil? my_bucket = s3.buckets[bucket_name] if my_bucket.exists? begin send("s3_#{method}", my_bucket, *args) rescue AWS::S3::Errors::AccessDenied => e raise InsufficientPermissions, "Unable to read from bucket: #{e.}" end else raise BucketDoesNotExistError, "Bucket has either expired or does not exist" end end |
#delete ⇒ Object
11 12 13 |
# File 'lib/queuel/sqs/message.rb', line 11 def delete .delete end |
#raw_body ⇒ Object
7 8 9 |
# File 'lib/queuel/sqs/message.rb', line 7 def raw_body @raw_body ||= ? : end |