Skip to content

class Athena::Routing::Matcher::TraceableURLMatcher
inherits Athena::Routing::Matcher::URLMatcher #

Extension of ART::Matcher::URLMatcher to assist with debugging by tracing the match.

See #traces.

Constructors#

.new(routes : ART::RouteCollection, context : ART::RequestContext, route_provider : ART::RouteProvider.class = ART::RouteProvider)#

View source

Methods#

#match(path : String) : ART::Parameters#

Tries to match the provided path to its related route. Returns an ART::Parameters containing the route's defaults and parameters resolved from the path.

Raises an ART::Exception::ResourceNotFound if no route could be matched.

Raises an ART::Exception::MethodNotAllowed if a route exists but not for the current HTTP method.

View source

#traces(path : String) : Array(ART::Matcher::TraceableURLMatcher::Trace)#

Returns an array of ART::Matcher::TraceableURLMatcher::Trace representing the history of the matching logic when trying to match the provided path.

View source

#traces(request : ART::Request) : Array(ART::Matcher::TraceableURLMatcher::Trace)#

Returns an array of ART::Matcher::TraceableURLMatcher::Trace representing the history of the matching logic when trying to match the provided request.

View source