Class: Backup::Storage::S3

Inherits:
Base
  • Object
show all
Defined in:
lib/backup/storage/s3.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#keep, #storage_id

Instance Method Summary collapse

Methods inherited from Base

#perform!

Methods included from Configuration::Helpers

included

Constructor Details

#initialize(model, storage_id = nil, &block) ⇒ S3

Creates a new instance of the storage object



25
26
27
28
29
30
31
# File 'lib/backup/storage/s3.rb', line 25

def initialize(model, storage_id = nil, &block)
  super(model, storage_id)

  @path ||= 'backups'

  instance_eval(&block) if block_given?
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Backup::Configuration::Helpers

Instance Attribute Details

#access_key_idObject

Amazon Simple Storage Service (S3) Credentials



13
14
15
# File 'lib/backup/storage/s3.rb', line 13

def access_key_id
  @access_key_id
end

#bucketObject

Amazon S3 bucket name and path



17
18
19
# File 'lib/backup/storage/s3.rb', line 17

def bucket
  @bucket
end

#pathObject

Amazon S3 bucket name and path



17
18
19
# File 'lib/backup/storage/s3.rb', line 17

def path
  @path
end

#regionObject

Region of the specified S3 bucket



21
22
23
# File 'lib/backup/storage/s3.rb', line 21

def region
  @region
end

#secret_access_keyObject

Amazon Simple Storage Service (S3) Credentials



13
14
15
# File 'lib/backup/storage/s3.rb', line 13

def secret_access_key
  @secret_access_key
end