Class: Mihari::Middleware::ErrorNotificationAdapter

Inherits:
Object
  • Object
show all
Includes:
Mihari::Mixins::ErrorNotification
Defined in:
lib/mihari/web/middleware/error_notification_adapter.rb

Instance Method Summary collapse

Methods included from Mihari::Mixins::ErrorNotification

#with_error_notification

Constructor Details

#initialize(app) ⇒ ErrorNotificationAdapter

Returns a new instance of ErrorNotificationAdapter.



6
7
8
# File 'lib/mihari/web/middleware/error_notification_adapter.rb', line 6

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/mihari/web/middleware/error_notification_adapter.rb', line 10

def call(env)
  with_error_notification do
    status, headers, body = @app.call(env)

    [status, headers, body]
  end
end