Class: Fluffy::S3Path

Inherits:
Object
  • Object
show all
Defined in:
lib/fluffy/s3_path.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file_path, access_key_id, secret_access_key, bucket, start_path = '') ⇒ S3Path

Returns a new instance of S3Path.



5
6
7
8
9
10
11
12
# File 'lib/fluffy/s3_path.rb', line 5

def initialize(file_path, access_key_id, secret_access_key, bucket, start_path = '')
  self.file_path = file_path
  self.access_key_id = access_key_id
  self.secret_access_key = secret_access_key
  self.s3 = RightAws::S3.new(self.access_key_id, self.secret_access_key)
  self.bucket = self.s3.bucket(bucket)
  self.start_path = start_path
end

Instance Attribute Details

#access_key_idObject

Returns the value of attribute access_key_id.



3
4
5
# File 'lib/fluffy/s3_path.rb', line 3

def access_key_id
  @access_key_id
end

#bucketObject

Returns the value of attribute bucket.



3
4
5
# File 'lib/fluffy/s3_path.rb', line 3

def bucket
  @bucket
end

#file_pathObject

Returns the value of attribute file_path.



3
4
5
# File 'lib/fluffy/s3_path.rb', line 3

def file_path
  @file_path
end

#s3Object

Returns the value of attribute s3.



3
4
5
# File 'lib/fluffy/s3_path.rb', line 3

def s3
  @s3
end

#secret_access_keyObject

Returns the value of attribute secret_access_key.



3
4
5
# File 'lib/fluffy/s3_path.rb', line 3

def secret_access_key
  @secret_access_key
end

#start_pathObject

Returns the value of attribute start_path.



3
4
5
# File 'lib/fluffy/s3_path.rb', line 3

def start_path
  @start_path
end