Class: Resque::Failure::Notification

Inherits:
Object
  • Object
show all
Defined in:
lib/resque/failure/notification.rb

Class Method Summary collapse

Instance Method Summary collapse

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

#generateObject



18
19
20
# File 'lib/resque/failure/notification.rb', line 18

def generate
  send(@level)
end