Class: Bugsnag::Middleware::Callbacks
- Inherits:
-
Object
- Object
- Bugsnag::Middleware::Callbacks
- Defined in:
- lib/bugsnag/middleware/callbacks.rb
Overview
Calls all configured callbacks passing an error report
Instance Method Summary collapse
- #call(report) ⇒ Object
-
#initialize(bugsnag) ⇒ Callbacks
constructor
A new instance of Callbacks.
Constructor Details
#initialize(bugsnag) ⇒ Callbacks
Returns a new instance of Callbacks.
5 6 7 |
# File 'lib/bugsnag/middleware/callbacks.rb', line 5 def initialize(bugsnag) @bugsnag = bugsnag end |
Instance Method Details
#call(report) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/bugsnag/middleware/callbacks.rb', line 9 def call(report) if report.request_data[:before_callbacks] report.request_data[:before_callbacks].each {|c| c.call(*[report][0...c.arity]) } end @bugsnag.call(report) end |