Class: Backup::Notifier::Ses

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

Returns a new instance of Ses.



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

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

  @region ||= 'eu-west-1'
  @send_log_on ||= [:warning, :failure]
end

Dynamic Method Handling

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

Instance Attribute Details

#access_key_idObject

Amazon Simple Email Service (SES) Credentials



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

def access_key_id
  @access_key_id
end

#bccObject

BCC receiver Email Address



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

def bcc
  @bcc
end

#ccObject

CC receiver Email Address



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

def cc
  @cc
end

#fromObject

Sender Email Address



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

def from
  @from
end

#regionObject

SES Region



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

def region
  @region
end

#reply_toObject

Set reply to email address



34
35
36
# File 'lib/backup/notifier/ses.rb', line 34

def reply_to
  @reply_to
end

#secret_access_keyObject

Amazon Simple Email Service (SES) Credentials



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

def secret_access_key
  @secret_access_key
end

#send_log_onObject

Array of statuses for which the log file should be attached.

Available statuses are: ‘:success`, `:warning` and `:failure`. Default: [:warning, :failure]



49
50
51
# File 'lib/backup/notifier/ses.rb', line 49

def send_log_on
  @send_log_on
end

#toObject

Receiver Email Address



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

def to
  @to
end