Class: Reaxar::Middleware::MiddlewareAbstract Abstract
- Inherits:
-
Object
- Object
- Reaxar::Middleware::MiddlewareAbstract
- Defined in:
- lib/reaxar/middleware/middleware_abstract.rb
Overview
This class is abstract.
Abstract base class for HTTP middleware.
All middleware should inherit from this class and implement the #process_request and #process_response methods.
Instance Method Summary collapse
-
#process_request(request) ⇒ Hash
Processes the HTTP request before it is sent.
-
#process_response(response, request) ⇒ Object
Processes the HTTP response after it is received.
Instance Method Details
#process_request(request) ⇒ Hash
Processes the HTTP request before it is sent.
16 17 18 |
# File 'lib/reaxar/middleware/middleware_abstract.rb', line 16 def process_request(request) raise NotImplementedError, "#{self.class} has not implemented method '#{__method__}'" end |
#process_response(response, request) ⇒ Object
Processes the HTTP response after it is received.
25 26 27 |
# File 'lib/reaxar/middleware/middleware_abstract.rb', line 25 def process_response(response, request) raise NotImplementedError, "#{self.class} has not implemented method '#{__method__}'" end |