Class: Backup::Storage::Baidu

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Baidu.



6
7
8
9
10
11
12
13
# File 'lib/backup/storage/baidu.rb', line 6

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

  @path ||= 'backups'
  @cache_path ||= '.cache'

  instance_eval(&block) if block_given?
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



4
5
6
# File 'lib/backup/storage/baidu.rb', line 4

def api_key
  @api_key
end

#api_secretObject

Returns the value of attribute api_secret.



4
5
6
# File 'lib/backup/storage/baidu.rb', line 4

def api_secret
  @api_secret
end

#cache_pathObject

Returns the value of attribute cache_path.



4
5
6
# File 'lib/backup/storage/baidu.rb', line 4

def cache_path
  @cache_path
end

#pathObject

Returns the value of attribute path.



4
5
6
# File 'lib/backup/storage/baidu.rb', line 4

def path
  @path
end