Class: Bugsnag::Middleware::Mailman

Inherits:
Object
  • Object
show all
Defined in:
lib/bugsnag/middleware/mailman.rb

Instance Method Summary collapse

Constructor Details

#initialize(bugsnag) ⇒ Mailman

Returns a new instance of Mailman.



3
4
5
# File 'lib/bugsnag/middleware/mailman.rb', line 3

def initialize(bugsnag)
  @bugsnag = bugsnag
end

Instance Method Details

#call(notification) ⇒ Object



7
8
9
10
11
# File 'lib/bugsnag/middleware/mailman.rb', line 7

def call(notification)
  mailman_msg = notification.request_data[:mailman_msg]
  notification.add_tab(:mailman, {"message" => mailman_msg}) if mailman_msg
  @bugsnag.call(notification)
end