Class: DataMapper::S3::ClassBucketConnector

Inherits:
BaseBucketConnector show all
Defined in:
lib/dm-s3.rb

Instance Method Summary collapse

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

#bucketObject



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

#s3Object



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, options)
  s3
  super
end