Class: Backup::DatabaseBackupError

Inherits:
Error
  • Object
show all
Defined in:
lib/backup.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config, db_file_name) ⇒ DatabaseBackupError

Returns a new instance of DatabaseBackupError.


22
23
24
25
# File 'lib/backup.rb', line 22

def initialize(config, db_file_name)
  @config = config
  @db_file_name = db_file_name
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.


20
21
22
# File 'lib/backup.rb', line 20

def config
  @config
end

#db_file_nameObject (readonly)

Returns the value of attribute db_file_name.


20
21
22
# File 'lib/backup.rb', line 20

def db_file_name
  @db_file_name
end

Instance Method Details

#messageObject


27
28
29
# File 'lib/backup.rb', line 27

def message
  "Failed to create compressed file '#{db_file_name}' when trying to backup the main database:\n - host: '#{config[:host]}'\n - port: '#{config[:port]}'\n - database: '#{config[:database]}'"
end