class

Athena::Routing::Matcher::TraceableURLMatcher

Inherits Athena::Routing::Matcher::URLMatcher < Athena::Routing::Matcher::URLMatcherInterface < Athena::Routing::RequestContextAwareInterface < Athena::Routing::Matcher::RequestMatcherInterface < Reference < Object

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)
Source

Instance 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.

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.

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.

Source

Nested types