Class: Mediate::PostrequestBehavior Abstract
- Inherits:
-
Object
- Object
- Mediate::PostrequestBehavior
- Defined in:
- lib/mediate/postrequest_behavior.rb
Overview
This class is abstract.
override #handle to implement
Abstract base class of a pipeline behavior that processes a request after the RequestHandler finishes.
Class Method Summary collapse
-
.handles(request_class = Mediate::Request, mediator = Mediate.mediator) ⇒ void
Registers this behavior to handle requests of the given type.
Instance Method Summary collapse
-
#handle(_request, _result) ⇒ void
abstract
The method that handles the request and the result that the handler returned.
Class Method Details
.handles(request_class = Mediate::Request, mediator = Mediate.mediator) ⇒ void
This method returns an undefined value.
Registers this behavior to handle requests of the given type.
20 21 22 |
# File 'lib/mediate/postrequest_behavior.rb', line 20 def self.handles(request_class = Mediate::Request, mediator = Mediate.mediator) mediator.register_postrequest_behavior(self, request_class) end |
Instance Method Details
#handle(_request, _result) ⇒ void
This method is abstract.
This method returns an undefined value.
The method that handles the request and the result that the handler returned.
34 35 36 |
# File 'lib/mediate/postrequest_behavior.rb', line 34 def handle(_request, _result) raise NoMethodError, "handle must be implemented" end |