class Stoplight::Notifier::Bugsnag
@see Base
Constants
- DEFAULT_OPTIONS
- StoplightStatusChange
Attributes
bugsnag[R]
@return [::Bugsnag]
formatter[R]
@return [Proc]
options[R]
@return [Hash{Symbol => Object}]
Public Class Methods
new(bugsnag, formatter = nil, options = {})
click to toggle source
@param bugsnag [::Bugsnag] @param formatter [Proc, nil] @param options [Hash{Symbol => Object}] @option options [String] :severity
# File lib/stoplight/notifier/bugsnag.rb, line 24 def initialize(bugsnag, formatter = nil, options = {}) @bugsnag = bugsnag @formatter = formatter || Default::FORMATTER @options = DEFAULT_OPTIONS.merge(options) end
Public Instance Methods
notify(light, from_color, to_color, error)
click to toggle source
# File lib/stoplight/notifier/bugsnag.rb, line 30 def notify(light, from_color, to_color, error) message = formatter.call(light, from_color, to_color, error) bugsnag.notify(StoplightStatusChange.new(message), options) message end