Class: CheckerJobs::Notifiers::Bugsnag
- Defined in:
- lib/checker_jobs/notifiers/bugsnag.rb
Defined Under Namespace
Classes: Error
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(check, count, entries) ⇒ Bugsnag
constructor
A new instance of Bugsnag.
- #notify ⇒ Object
Constructor Details
#initialize(check, count, entries) ⇒ Bugsnag
Returns a new instance of Bugsnag.
4 5 6 7 8 |
# File 'lib/checker_jobs/notifiers/bugsnag.rb', line 4 def initialize(check, count, entries) super @formatter = formatter_class.new(check, count, entries) end |
Class Method Details
.default_options ⇒ Object
21 22 23 |
# File 'lib/checker_jobs/notifiers/bugsnag.rb', line 21 def self. { formatter_class: CheckerJobs::Notifiers::BugsnagDefaultFormatter } end |
Instance Method Details
#notify ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/checker_jobs/notifiers/bugsnag.rb', line 10 def notify raise @formatter.base_error rescue Error => e ::Bugsnag.notify(e) do |notification| notification.severity = @formatter.severity notification.context = @formatter.context notification.grouping_hash = @formatter.grouping_hash notification.add_tab(*@formatter.tab_infos) end end |