Class: Errordite::Rack

Inherits:
Object
  • Object
show all
Defined in:
lib/errordite/rack.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, options = {}) ⇒ Rack

Returns a new instance of Rack.



5
6
7
8
# File 'lib/errordite/rack.rb', line 5

def initialize(app, options = {})
  @app = app
  @context = options[:context] || {}
end

Instance Method Details

#call(env) ⇒ Object



10
11
12
13
14
# File 'lib/errordite/rack.rb', line 10

def call(env)
  Errordite.monitor rack_context(env).merge(@context) do
    @app.call(env)
  end
end