Class: DataMapper::S3::ClassBucketConnector
- Inherits:
-
BaseBucketConnector
- Object
- BaseBucketConnector
- DataMapper::S3::ClassBucketConnector
- Defined in:
- lib/dm-s3.rb
Instance Method Summary collapse
- #bucket ⇒ Object
- #get_s3_object(instance) ⇒ Object
-
#initialize(klass, bucket_name) ⇒ ClassBucketConnector
constructor
A new instance of ClassBucketConnector.
- #s3 ⇒ Object
- #store(instance, file, options) ⇒ Object
Constructor Details
#initialize(klass, bucket_name) ⇒ ClassBucketConnector
Returns a new instance of ClassBucketConnector.
38 39 40 41 42 |
# File 'lib/dm-s3.rb', line 38 def initialize(klass, bucket_name) @class = klass @bucket_name = bucket_name super() end |
Instance Method Details
#bucket ⇒ Object
54 55 56 |
# File 'lib/dm-s3.rb', line 54 def bucket AWS::S3::Bucket.find @bucket_name end |
#get_s3_object(instance) ⇒ Object
44 45 46 47 |
# File 'lib/dm-s3.rb', line 44 def get_s3_object(instance) self.s3 super end |
#s3 ⇒ Object
58 59 60 61 |
# File 'lib/dm-s3.rb', line 58 def s3 @s3.set_current_bucket_to @bucket_name @s3 end |
#store(instance, file, options) ⇒ Object
49 50 51 52 |
# File 'lib/dm-s3.rb', line 49 def store(instance, file, ) s3 super end |