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 #

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

View source

#each #

Returns an Iterator for each registered route.

View source

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

Returns the ATH::Action with the provided name.

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

View source

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

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

View source

#routes #

Returns the routes hash.

View source