Class: Backup::Notifier::Pushover

Inherits:
Base
  • Object
show all
Defined in:
lib/backup/notifier/pushover.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

Constructor Details

#initialize(model, &block) ⇒ Pushover

Returns a new instance of Pushover.



29
30
31
32
# File 'lib/backup/notifier/pushover.rb', line 29

def initialize(model, &block)
  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

#deviceObject

The user’s device identifier to sent the message directly to, rather than all of the user’s devices



19
20
21
# File 'lib/backup/notifier/pushover.rb', line 19

def device
  @device
end

#priorityObject

The priority of the notification



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

def priority
  @priority
end

#titleObject

The message title



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

def title
  @title
end

#tokenObject

The API Application Token



14
15
16
# File 'lib/backup/notifier/pushover.rb', line 14

def token
  @token
end

#userObject

The API User Token



10
11
12
# File 'lib/backup/notifier/pushover.rb', line 10

def user
  @user
end