View Source Routex.Route (Routex v1.1.0)

Function for working with Routex augmented Phoenix Routes

Summary

Functions

Compatibility wrapper around Phoenix.Router.Route.exprs

Returns the nesting level of an (ancestor) route. By default the parent. This can be adjusted by providing an negative depth offset.

Returns routes grouped by the combination of method and origin path

Returns routes grouped by nesting level of an (ancestor) route. By default groups by parent. This can be adjusted by providing an negative depth offset

Functions

exprs(route, env)

@spec exprs(Phoenix.Router.Route.t(), Macro.Env.t()) :: map()

Compatibility wrapper around Phoenix.Router.Route.exprs

get_nesting(route, offset \\ 0)

Returns the nesting level of an (ancestor) route. By default the parent. This can be adjusted by providing an negative depth offset.

group_by_method_and_origin(routes)

Returns routes grouped by the combination of method and origin path

group_by_method_and_path(routes, offset \\ 0)

group_by_nesting(routes, offset \\ 0)

Returns routes grouped by nesting level of an (ancestor) route. By default groups by parent. This can be adjusted by providing an negative depth offset