Sha256: 51639532bcd22614cd31169ef118c8961408e821efebb7758a8e9e80fd17c84e
Contents?: true
Size: 792 Bytes
Versions: 31
Compression:
Stored size: 792 Bytes
Contents
## # Ancestor of all middlewares class Midori::Middleware # Init a middleware def initialize end # run before processing a request # @param [Midori::Request] request raw request # @return [Midori::Request] request to be further processed def before(request) request end # run after processing a request # @param [Midori::Request] _request raw request # @param [Midori::Response] response raw response # @return [Midori::Response] response to be further processed def after(_request, response) response end # Dynamically generate a method to use inside router # @param [Symbol] name name of the method # @yield the block to run def self.helper(name, &block) Midori::CleanRoom.class_exec do define_method(name, &block) end end end
Version data entries
31 entries across 31 versions & 2 rubygems