class Riot::AllImportantMiddleware

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.

Public Class Methods

new(&context_definition) click to toggle source
# File lib/riot/middleware.rb, line 97
def initialize(&context_definition)
  @context_definition = context_definition
end

Public Instance Methods

call(context) click to toggle source

(see Riot::ContextMiddleware#call)

# File lib/riot/middleware.rb, line 102
def call(context) context.instance_eval(&@context_definition); end