struct

Noir::TreeSitterGoRouteExtractor::Route

Inherits Struct < Value < Object

Constructors

new(router_name : String, verb : String, path : String, raw_path : String, handler : String, line : Int32, query_params : Array(String) = [] of String, handler_args : Array(String) = [] of String)
Source

Instance methods

file

The file the route is registered in when that is not the walked source: a route helper declared in another file (see RouteHelperIndex#external).

Source
file=(file : String | Nil)

The file the route is registered in when that is not the walked source: a route helper declared in another file (see RouteHelperIndex#external).

Source
handler
Source
handler_args

Text of every handler argument after the path, middleware included (r.GET("/x", RateLimit(), listX) -> ["RateLimit()", "listX"]), with append(mw, h)... spreads flattened. Decoders that don't record them fall back to the single handler.

Source
handler_row

0-based row where the last handler argument starts (an inline closure is declared there), when the decoder records it.

Source
handler_row=(handler_row : Int32 | Nil)

0-based row where the last handler argument starts (an inline closure is declared there), when the decoder records it.

Source
line
Source
path
Source
query_params
Source
raw_path
Source
router_name
Source
verb
Source