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_exceptionObject

Returns the value of attribute include_exception.



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

def include_exception
  @include_exception
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

.tagsObject

Returns the value of attribute tags.



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

def tags
  @tags
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
14
# File 'lib/resque_failed_job_mailer/resque/failure/notifier.rb', line 9

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

Instance Method Details

#saveObject



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

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