Class: Backup::Notifier::Base

Inherits:
Object
  • Object
show all
Includes:
Configuration::Helpers
Defined in:
lib/backup/notifier/base.rb

Direct Known Subclasses

Campfire, Mail, Presently, Twitter

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Configuration::Helpers

#clear_defaults!, #getter_methods, #load_defaults!, #setter_methods

Instance Attribute Details

#on_failureObject Also known as: notify_on_failure?

When set to true, the user will be notified by email when a backup process raises an exception before finishing



17
18
19
# File 'lib/backup/notifier/base.rb', line 17

def on_failure
  @on_failure
end

#on_successObject Also known as: notify_on_success?

When set to true, the user will be notified by email when a backup process ends without raising any exceptions



11
12
13
# File 'lib/backup/notifier/base.rb', line 11

def on_success
  @on_success
end

Instance Method Details

#log!Object

Logs a message to the console and log file to inform the client that Backup is notifying about the process



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

def log!
  Logger.message "#{ self.class } started notifying about the process."
end