class

Rayo::Router

Inherits Reference < Object

Constants

MAX_PARAMS = 32

Instance methods

add(method : HTTP::Method, path : String, handler : Handler) : Nil
Source
dispatch(ctx : Context) : Nil
Source
match(node : Node, path : Bytes, offset : Int32, ctx : Context) : Node | Nil

Static segments win, then parameters, then the trailing wildcard. Failed branches restore the capture count, so backtracking never leaves stale parameters behind.

Source
root
Source

Nested types