Class: Riot::AllImportantMiddleware
- Inherits:
-
ContextMiddleware
- Object
- ContextMiddleware
- Riot::AllImportantMiddleware
- Defined in:
- lib/riot/middleware.rb
Overview
Special middleware used by Context directly. It will always be the last in the chain and is the actual place where the user’s runtime context is processed.
Instance Attribute Summary
Attributes inherited from ContextMiddleware
Instance Method Summary collapse
- #call(context) ⇒ Object
-
#initialize(&context_definition) ⇒ AllImportantMiddleware
constructor
A new instance of AllImportantMiddleware.
Methods inherited from ContextMiddleware
Constructor Details
#initialize(&context_definition) ⇒ AllImportantMiddleware
Returns a new instance of AllImportantMiddleware.
33 34 35 |
# File 'lib/riot/middleware.rb', line 33 def initialize(&context_definition) @context_definition = context_definition end |
Instance Method Details
#call(context) ⇒ Object
37 |
# File 'lib/riot/middleware.rb', line 37 def call(context) context.instance_eval(&@context_definition); end |