Class: Backup::Storage::GoogleDrive

Inherits:
Base
  • Object
show all
Includes:
Cycler
Defined in:
lib/backup/storage/google_drive.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) ⇒ GoogleDrive

Creates a new instance of the storage object



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

def initialize(model, storage_id = nil)
  super

  @path           ||= "backups"
  @cache_path     ||= ".cache"
  path.sub!(/^\//, "")
end

Dynamic Method Handling

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

Instance Attribute Details

#api_versionObject

Returns the value of attribute api_version.



14
15
16
# File 'lib/backup/storage/google_drive.rb', line 14

def api_version
  @api_version
end

#cache_pathObject

Returns the value of attribute cache_path.



14
15
16
# File 'lib/backup/storage/google_drive.rb', line 14

def cache_path
  @cache_path
end

#client_idObject

Returns the value of attribute client_id.



14
15
16
# File 'lib/backup/storage/google_drive.rb', line 14

def client_id
  @client_id
end

#client_secretObject

Returns the value of attribute client_secret.



14
15
16
# File 'lib/backup/storage/google_drive.rb', line 14

def client_secret
  @client_secret
end

#folder_idObject

Returns the value of attribute folder_id.



14
15
16
# File 'lib/backup/storage/google_drive.rb', line 14

def folder_id
  @folder_id
end