class

CRails::Routes::RouteSet

Inherits Reference < Object

Instance methods

draw

with ... yield makes the block a DSL: bare root/get/... calls inside draw do ... end are routed to the Drawer.

Source
match(verb : String, path : String) : Match | Nil
Source
named_routes

Index name → route for URL generation (the reverse direction of match). Built lazily on the first lookup; the last route drawn with a given name wins, as in Rails.

Source
path_for(name : String, args : Array(String)) : String

Builds a URL path for a named route — the runtime behind the *_path/*_url helpers (Routes::UrlHelpers). Positional args fill the dynamic segments left-to-right, url-encoded; literal prefixes ("@:message_id") keep the prefix and encode only the value. Leftover args become query params with the value as both key and value, as Rails does for unnamed extras. Raises ArgumentError (the UrlGenerationError analogue) on an unknown name or missing segment values.

Source
routes