Class: Raygun::Middleware::BreadcrumbsStoreInitializer

Inherits:
Object
  • Object
show all
Defined in:
lib/raygun/middleware/breadcrumbs_store_initializer.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ BreadcrumbsStoreInitializer

Returns a new instance of BreadcrumbsStoreInitializer.



4
5
6
# File 'lib/raygun/middleware/breadcrumbs_store_initializer.rb', line 4

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/raygun/middleware/breadcrumbs_store_initializer.rb', line 8

def call(env)
  Breadcrumbs::Store.initialize

  begin
    @app.call(env)
  ensure
    Breadcrumbs::Store.clear
  end
end