Sha256: fcfef86e13e22a4eba5b9b909c3edddca7b387a2c6164857dad0ced0d7ffa9bd
Contents?: true
Size: 677 Bytes
Versions: 9
Compression:
Stored size: 677 Bytes
Contents
class Rack::App::Router::Static < Rack::App::Router::Base protected def get_app(env) request_method= get_request_method(env) find_by_path_infos(env) do |request_path| mapped_endpoint_routes[[request_method, request_path]] end end def mapped_endpoint_routes @mapped_endpoint_routes ||= {} end def clean_routes! mapped_endpoint_routes.clear end def compile_endpoint!(endpoint) routing_key = [endpoint.request_method, endpoint.request_path] mapped_endpoint_routes[routing_key]= as_app(endpoint) end def compile_registered_endpoints! endpoints.each do |endpoint| compile_endpoint!(endpoint) end end end
Version data entries
9 entries across 9 versions & 1 rubygems