class Alfodr::Router::Router
- Alfodr::Router::Router
- Reference
- Object
Overview
This is the main application handler all routers should finally hit this handler.
Defined in:
alfodr/router/router.crConstant Summary
-
PATH_EXT_REGEX =
/\.[^$\/]+$/
Constructors
Instance Method Summary
- #add(route : Route)
- #add_socket_route(route, handler : WebSockets::Server::Handler)
- #draw(valve : Symbol, scope : String, &)
-
#draw(valve : Symbol, &)
This registers all the routes for the application
- #get_socket_handler(request)
- #match(http_verb, resource) : Amber::Router::RoutedResult(Route)
- #match_by_controller_action(controller, action)
- #match_by_request(request)
- #route_defined?(request)
- #routes : Amber::Router::RouteSet(Alfodr::Route)
- #routes=(routes : Amber::Router::RouteSet(Alfodr::Route))
- #routes_hash : Hash(String, Alfodr::Route)
- #routes_hash=(routes_hash : Hash(String, Alfodr::Route))
- #socket_route_defined?(request)
- #socket_routes : Array({path: String, handler: Alfodr::WebSockets::Server::Handler})
- #socket_routes=(socket_routes : Array(NamedTuple(path: String, handler: Alfodr::WebSockets::Server::Handler)))
Constructor Detail
Instance Method Detail
def socket_routes : Array({path: String, handler: Alfodr::WebSockets::Server::Handler})
#
def socket_routes=(socket_routes : Array(NamedTuple(path: String, handler: Alfodr::WebSockets::Server::Handler)))
#