Sha256: 3cd33eea6987da9541dc288198b6960cea73de6473b85eb048359d2cf5d48c38
Contents?: true
Size: 982 Bytes
Versions: 78
Compression:
Stored size: 982 Bytes
Contents
module Jets module Middleware extend Memoist autoload :Configurator, 'jets/middleware/configurator' autoload :DefaultStack, 'jets/middleware/default_stack' autoload :Layer, 'jets/middleware/layer' autoload :Stack, 'jets/middleware/stack' def call(env) stack = middlewares.build(endpoint) stack.call(env) end # Final middleware in the stack def endpoint Jets::Controller::Middleware::Main end # Called in Jets::Booter to build middleware stack only once during bootup def build_stack middlewares end def middlewares config_middleware.merge_into(default_stack) # returns Jets::Middleware::Stack end memoize :middlewares def default_stack Jets::Middleware::DefaultStack.new(Jets.config, Jets.application).build_stack # returns Jets::Middleware::Stack end def config_middleware Jets.config.middleware # returns Jets::Middleware::Configurator end end end
Version data entries
78 entries across 78 versions & 2 rubygems