Class: Backup::Notifier::Pushover

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

Instance Attribute Summary collapse

Attributes inherited from Base

#on_failure, #on_success, #on_warning

Instance Method Summary collapse

Methods inherited from Base

#perform!

Methods included from Configuration::Helpers

included

Constructor Details

#initialize(model, &block) ⇒ Pushover

Returns a new instance of Pushover.


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

def initialize(model, &block)
  super(model)

  instance_eval(&block) if block_given?
end

Dynamic Method Handling

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

Instance Attribute Details

#deviceObject

The user's device identifier to sent he message directly to that device rather than all of the user's devices


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

def device
  @device
end

#priorityObject

The priority of the notification


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

def priority
  @priority
end

#titleObject

The message title


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

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