class ActionController::Router::RouteHandler

Included Modules

Defined in:

action-controller/router/route_handler.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def add_route(method : String, path : String, action : Tuple(Action, Bool)) #

Adds a route handler to the system Determines if routes are static or require decomposition and stores them appropriately


[View source]
def call(context : HTTP::Server::Context) #

Routes requests to the appropriate handler Called from HTTP::Server in server.cr


[View source]
def search_route(context : HTTP::Server::Context) : Tuple(Action, Bool) | Nil #

Builds the internal representation of a route then searches static routes before checking the matcher


[View source]