Skip to content

class Athena::Routing::RouteCollection
inherits Reference #

Wrapper around all the registered routes of an application. Routes are cached as a class variables since they're immutable once the program has been built.

Included modules

Enumerable Iterable

Direct known subclasses

Athena::Routing::Spec::MockRouteCollection

Methods#

#each(&) : Nil #

Yields the name and ART::Action object for each registered route.

View source

#each #

Returns an Iterator for each registered route.

View source

#get(name : String) : ART::ActionBase #

Returns the ART::Action with the provided name.

Raises a KeyError if a route with the provided name does not exist.

View source

#get?(name : String) : ART::ActionBase? #

Returns the ART::Action with the provided name, or nil if it does not exist.

View source

#routes : Hash(String, ART::ActionBase) #

Returns the routes hash.

View source