Class: Rack::App::Endpoint::Catcher
- Inherits:
-
Object
- Object
- Rack::App::Endpoint::Catcher
- Defined in:
- lib/rack/app/endpoint/catcher.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, endpoint_properties) ⇒ Catcher
constructor
A new instance of Catcher.
Constructor Details
#initialize(app, endpoint_properties) ⇒ Catcher
Returns a new instance of Catcher.
3 4 5 6 |
# File 'lib/rack/app/endpoint/catcher.rb', line 3 def initialize(app, endpoint_properties) @app = app @endpoint_properties = endpoint_properties end |
Instance Method Details
#call(env) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/rack/app/endpoint/catcher.rb', line 8 def call(env) resp = handle_rack_response do handle_response_body(env) do @app.call(env) end end return resp.finish if resp.is_a?(Rack::Response) resp end |