Class: Resque::Failure::Notifier

Inherits:
Base
  • Object
show all
Defined in:
lib/resque_failed_job_mailer/resque/failure/notifier.rb

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.fromObject

Returns the value of attribute from.



7
8
9
# File 'lib/resque_failed_job_mailer/resque/failure/notifier.rb', line 7

def from
  @from
end

.include_payloadObject

Returns the value of attribute include_payload.



7
8
9
# File 'lib/resque_failed_job_mailer/resque/failure/notifier.rb', line 7

def include_payload
  @include_payload
end

.mailObject

Returns the value of attribute mail.



7
8
9
# File 'lib/resque_failed_job_mailer/resque/failure/notifier.rb', line 7

def mail
  @mail
end

.mailerObject

Returns the value of attribute mailer.



7
8
9
# File 'lib/resque_failed_job_mailer/resque/failure/notifier.rb', line 7

def mailer
  @mailer
end

.toObject

Returns the value of attribute to.



7
8
9
# File 'lib/resque_failed_job_mailer/resque/failure/notifier.rb', line 7

def to
  @to
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



9
10
11
12
13
# File 'lib/resque_failed_job_mailer/resque/failure/notifier.rb', line 9

def configure
  yield self
  self.include_payload = true if include_payload.nil?
  Resque::Failure.backend = self unless Resque::Failure.backend == Resque::Failure::Multiple
end

Instance Method Details

#saveObject



16
17
18
19
# File 'lib/resque_failed_job_mailer/resque/failure/notifier.rb', line 16

def save
  self.class.mailer.send(self.class.mail, self).deliver
rescue
end