class Bugsnag::Middleware::Breadcrumbs

Adds breadcrumbs to the report

Public Class Methods

new(next_callable) click to toggle source

@param next_callable [#call] the next callable middleware

# File lib/bugsnag/middleware/breadcrumbs.rb, line 7
def initialize(next_callable)
  @next = next_callable
end

Public Instance Methods

call(report) click to toggle source

Execute this middleware

@param report [Bugsnag::Report] the report being iterated over

# File lib/bugsnag/middleware/breadcrumbs.rb, line 15
def call(report)
  breadcrumbs = report.configuration.breadcrumbs.to_a
  report.breadcrumbs = breadcrumbs unless breadcrumbs.empty?
  @next.call(report)
end