Class: Resque::Failure::Notification
- Inherits:
-
Object
- Object
- Resque::Failure::Notification
- Defined in:
- lib/resque/failure/notification.rb
Class Method Summary collapse
-
.generate(failure, level) ⇒ Object
Generate the text to be displayed in the Slack Notification.
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(failure, level) ⇒ Notification
constructor
A new instance of Notification.
Constructor Details
#initialize(failure, level) ⇒ Notification
Returns a new instance of Notification.
13 14 15 16 |
# File 'lib/resque/failure/notification.rb', line 13 def initialize(failure, level) @failure = failure @level = level end |
Class Method Details
.generate(failure, level) ⇒ Object
Generate the text to be displayed in the Slack Notification
failure: resque failure level: notification style
9 10 11 |
# File 'lib/resque/failure/notification.rb', line 9 def self.generate(failure, level) new(failure, level).generate end |
Instance Method Details
#generate ⇒ Object
18 19 20 |
# File 'lib/resque/failure/notification.rb', line 18 def generate send(@level) end |