Class: Resque::Integration::Configuration::Notifier
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Resque::Integration::Configuration::Notifier
- Defined in:
- lib/resque/integration/configuration.rb
Overview
Failure notifier configuration
Instance Method Summary collapse
-
#enabled? ⇒ Boolean
Is notifier enabled.
-
#from ⇒ Object
Returns sender address.
-
#include_payload? ⇒ Boolean
Returns true if payload should be included into reports.
-
#initialize(config) ⇒ Notifier
constructor
A new instance of Notifier.
-
#mail ⇒ Object
Returns mailer method.
-
#mailer ⇒ Object
Returns mailer class.
-
#to ⇒ Object
Returns recipients list.
Constructor Details
#initialize(config) ⇒ Notifier
Returns a new instance of Notifier.
47 48 49 |
# File 'lib/resque/integration/configuration.rb', line 47 def initialize(config) super(config || {}) end |
Instance Method Details
#enabled? ⇒ Boolean
Is notifier enabled
52 53 54 |
# File 'lib/resque/integration/configuration.rb', line 52 def enabled? to.any? && enabled.nil? ? true : enabled end |
#from ⇒ Object
Returns sender address
69 70 71 |
# File 'lib/resque/integration/configuration.rb', line 69 def from super || '[email protected]' end |
#include_payload? ⇒ Boolean
Returns true if payload should be included into reports
57 58 59 60 61 |
# File 'lib/resque/integration/configuration.rb', line 57 def include_payload? include_payload.nil? ? true : include_payload end |
#mail ⇒ Object
Returns mailer method
74 75 76 |
# File 'lib/resque/integration/configuration.rb', line 74 def mail (super || :alert).to_sym end |
#mailer ⇒ Object
Returns mailer class
79 80 81 |
# File 'lib/resque/integration/configuration.rb', line 79 def mailer super || 'ResqueFailedJobMailer::Mailer' end |
#to ⇒ Object
Returns recipients list
64 65 66 |
# File 'lib/resque/integration/configuration.rb', line 64 def to super || [] end |