class Athena::Routing::RouteResolver

Overview

Registers an ART::Route for each action with the router. This type is a singleton as opposed to a service to prevent all the routes from having to be redefined on each request.

Defined in:

route_resolver.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def resolve(request : HTTP::Request) : Amber::Router::RoutedResult(Athena::Routing::Action) #

Attempts to resolve the request into an Amber::Router::RoutedResult(Athena::Routing::Action).

Raises an ART::Exceptions::NotFound exception if a corresponding ART::Route could not be resolved. Raises an ART::Exceptions::MethodNotAllowed exception if a route was matched but does not support the request's method.


[View source]