Class: Backup::Storage::Qiniu

Inherits:
Base
  • Object
show all
Includes:
Cycler
Defined in:
lib/backup/storage/qiniu.rb

Defined Under Namespace

Classes: Error

Instance Attribute Summary collapse

Attributes inherited from Base

#keep, #model, #package, #path, #storage_id

Instance Method Summary collapse

Methods inherited from Base

#perform!

Methods included from Config::Helpers

included

Constructor Details

#initialize(model, storage_id = nil) ⇒ Qiniu

Returns a new instance of Qiniu.



17
18
19
20
21
22
23
24
# File 'lib/backup/storage/qiniu.rb', line 17

def initialize(model, storage_id = nil)
  super

  @path ||= "backups"

  check_configuration
  config_credentials
end

Dynamic Method Handling

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

Instance Attribute Details

#access_keyObject

Qiniu API credentials



11
12
13
# File 'lib/backup/storage/qiniu.rb', line 11

def access_key
  @access_key
end

#bucketObject

Qiniu bucket name



15
16
17
# File 'lib/backup/storage/qiniu.rb', line 15

def bucket
  @bucket
end

#secret_keyObject

Qiniu API credentials



11
12
13
# File 'lib/backup/storage/qiniu.rb', line 11

def secret_key
  @secret_key
end