class CheckerJobs::Notifiers::Bugsnag

Public Class Methods

default_options() click to toggle source
# File lib/checker_jobs/notifiers/bugsnag.rb, line 21
def self.default_options
  { formatter_class: CheckerJobs::Notifiers::BugsnagDefaultFormatter }
end
new(check, count, entries) click to toggle source
Calls superclass method CheckerJobs::Notifiers::Base::new
# File lib/checker_jobs/notifiers/bugsnag.rb, line 4
def initialize(check, count, entries)
  super

  @formatter = formatter_class.new(check, count, entries)
end

Public Instance Methods

notify() click to toggle source
# File lib/checker_jobs/notifiers/bugsnag.rb, line 10
def notify
  raise @formatter.base_error
rescue Error => error
  ::Bugsnag.notify(error) do |notification|
    notification.severity = @formatter.severity
    notification.context = @formatter.context
    notification.grouping_hash = @formatter.grouping_hash
    notification.add_tab(*@formatter.tab_infos)
  end
end

Private Instance Methods

formatter_class() click to toggle source
# File lib/checker_jobs/notifiers/bugsnag.rb, line 27
def formatter_class
  notifier_options.fetch(:formatter_class)
end