Class: Backup::Syncer::Cloud::S3

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

Constant Summary

Constants included from CLI::Helpers

CLI::Helpers::UTILITY

Instance Attribute Summary collapse

Attributes inherited from Base

#mirror, #path

Instance Method Summary collapse

Methods inherited from Base

#add, #directories

Methods included from Configuration::Helpers

included

Constructor Details

#initialize(&block) ⇒ S3

Instantiates a new Cloud::S3 Syncer.

Pre-configured defaults specified in Configuration::Syncer::Cloud::S3 are set via a super() call to Cloud::Base, which in turn will invoke Syncer::Base.

Once pre-configured defaults and Cloud specific defaults are set, the block from the user's configuration file is evaluated.


30
31
32
33
34
35
# File 'lib/backup/syncer/cloud/s3.rb', line 30

def initialize(&block)
  super

  instance_eval(&block) if block_given?
  @path = path.sub(/^\//, '')
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


10
11
12
# File 'lib/backup/syncer/cloud/s3.rb', line 10

def access_key_id
  @access_key_id
end

#bucketObject

The S3 bucket to store files to


14
15
16
# File 'lib/backup/syncer/cloud/s3.rb', line 14

def bucket
  @bucket
end

#regionObject

The AWS region of the specified S3 bucket


18
19
20
# File 'lib/backup/syncer/cloud/s3.rb', line 18

def region
  @region
end

#secret_access_keyObject

Amazon Simple Storage Service (S3) Credentials


10
11
12
# File 'lib/backup/syncer/cloud/s3.rb', line 10

def secret_access_key
  @secret_access_key
end