View Source Routex.Route (Phoenix Routes Extension Framework v0.1.0-alpha.3)

Function for working with Phoenix Routes

Link to this section 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 nesting level of an (ancestor) route. By default groups by parent. This can be adjusted by providing an negative depth offset

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

Link to this section Functions

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

Compatibility wrapper around Phoenix.Router.Route.exprs

Link to this function

get_nesting(route, offset \\ 0)

View Source

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

Link to this function

group_by_nesting(routes, offset \\ 0)

View Source

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

Link to this function

group_by_path(routes, offset \\ 0)

View Source

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