Method: Backup::Notifier::Base#initialize
- Defined in:
- lib/backup/notifier/base.rb
#initialize(model) ⇒ Base
Returns a new instance of Base.
50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/backup/notifier/base.rb', line 50 def initialize(model) @model = model load_defaults! @on_success = true if on_success.nil? @on_warning = true if on_warning.nil? @on_failure = true if on_failure.nil? @max_retries ||= 10 @retry_waitsec ||= 30 @message ||= lambda do |model, data| "[#{ data[:status][:message] }] #{ model.label } (#{ model.trigger })" end end |