class PryRescue::Rack

A Rack middleware that wraps each web request in Pry::rescue.

Public Class Methods

new(app) click to toggle source

Instantiate the middleware

@param [#call] app

# File lib/pry-rescue/rack.rb, line 9
def initialize(app)
  @app = app
end

Public Instance Methods

call(env) click to toggle source

Handle a web request @param [Rack::Env] env

# File lib/pry-rescue/rack.rb, line 15
def call(env)
  Pry::rescue{ @app.call(env) }
end