Class: Backup::Notifier::Prowl

Inherits:
Base
  • Object
show all
Defined in:
lib/backup/notifier/prowl.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#max_retries, #message, #model, #on_failure, #on_success, #on_warning, #retry_waitsec

Instance Method Summary collapse

Methods inherited from Base

#perform!

Methods included from Config::Helpers

included

Methods included from Utilities::Helpers

#utility_remote

Constructor Details

#initialize(model, &block) ⇒ Prowl

Returns a new instance of Prowl.



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

def initialize(model, &block)
  @message = lambda do |model, data|
    "#{ model.label } (#{ model.trigger })"
  end
  super
  instance_eval(&block) if block_given?
end

Dynamic Method Handling

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

Instance Attribute Details

#api_keyObject

API-Key Create a Prowl account and request an API key on prowlapp.com.



16
17
18
# File 'lib/backup/notifier/prowl.rb', line 16

def api_key
  @api_key
end

#applicationObject

Application name Tell something like your server name. Example: “Server1 Backup”



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

def application
  @application
end