Class: Appsignal::Rack::PathableBodyWrapper
- Inherits:
-
EnumerableBodyWrapper
- Object
- BodyWrapper
- EnumerableBodyWrapper
- Appsignal::Rack::PathableBodyWrapper
- Defined in:
- lib/appsignal/rack/body_wrapper.rb
Overview
Having “to_path” on a body allows Rack to serve out a static file, or to pass that file to the downstream webserver for sending using X-Sendfile
Constant Summary
Constants inherited from BodyWrapper
Instance Method Summary collapse
Methods inherited from EnumerableBodyWrapper
Methods inherited from BodyWrapper
#close, #initialize, #method_missing, #respond_to_missing?, wrap
Constructor Details
This class inherits a constructor from Appsignal::Rack::BodyWrapper
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Appsignal::Rack::BodyWrapper
Instance Method Details
#to_path ⇒ Object
168 169 170 171 172 173 174 175 176 177 178 179 180 |
# File 'lib/appsignal/rack/body_wrapper.rb', line 168 def to_path Appsignal.instrument( "process_response_body.rack", "Process Rack response body (#to_path)" ) do @body.to_path end rescue *IGNORED_ERRORS # Do not report raise rescue Exception => error # rubocop:disable Lint/RescueException appsignal_report_error(error) raise error end |