Class: Backup::Notifier::FlowDock

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

Returns a new instance of FlowDock.



35
36
37
38
39
40
41
42
# File 'lib/backup/notifier/flowdock.rb', line 35

def initialize(model, &block)
  super
  instance_eval(&block) if block_given?

  @subject        ||= default_subject
  @source         ||= default_source
  @tags           ||= []
end

Dynamic Method Handling

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

Instance Attribute Details

#from_emailObject

Which email the notification should appear from



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

def from_email
  @from_email
end

#from_nameObject

Who the notification should appear from



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

def from_name
  @from_name
end

link for message



33
34
35
# File 'lib/backup/notifier/flowdock.rb', line 33

def link
  @link
end

#sourceObject

source for message



21
22
23
# File 'lib/backup/notifier/flowdock.rb', line 21

def source
  @source
end

#subjectObject

Subject for message



25
26
27
# File 'lib/backup/notifier/flowdock.rb', line 25

def subject
  @subject
end

#tagsObject

tag message in inbox



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

def tags
  @tags
end

#tokenObject

The Flowdock API token



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

def token
  @token
end