View Source Routex.Route (Phoenix Routes Extension Framework v0.3.0-alpha.4)

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

@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_method_and_origin(routes)

View Source

Returns routes grouped by the combination of method and origin path

Link to this function

group_by_method_and_path(routes, offset \\ 0)

View Source
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