Skip to content

class Athena::Routing::RouteProvider
inherits Reference #

Stores the compiled route data on the class level for performance reasons.

This type is default location, but can be extended to support multiple routers using different route collections without affecting one another.

class MyCustomProvider < ART::RouteProvider
end

# ...

# Compile the provided routes into MyCustomProvider, instead of the default provider.
ART.compile routes, route_provider: MyCustomProvider

Class methods#

.compile(routes : ART::RouteCollection) : Nil#

View source