data Bezel::Route

One route of a router's table: requests of method matching pattern (as HTTP::Router reads patterns: /users/{id}) go through the pipelines, then to action of controller. name is the route's name, for its helpers (user gives user_path), or nil.

src/routes.qz:5

Methods

def method -> String

"GET", "POST", ...

src/routes.qz:7

def pattern -> String

The path pattern.

src/routes.qz:9

def controller -> Type[Bezel::Controller]

The controller.

src/routes.qz:11

def action -> Symbol

The action, a public method of the controller taking and returning a Conn.

src/routes.qz:14

def pipelines -> Array[Symbol]

The pipelines the request goes through first, outermost first.

src/routes.qz:16

def name -> String?

The route's name, or nil.

src/routes.qz:18

def params -> Array[Symbol]

The names of the pattern's parameters, in order ([:post_id, :id]).

src/routes.qz:21

def to_h -> Hash[Symbol, Object]

The fields as a Hash, by name.

src/routes.qz:21

def with(*, method: String = …, pattern: String = …, controller: Type[Bezel::Controller] = …, action: Symbol = …, pipelines: Array[Symbol] = …, name: String? = …) -> Bezel::Route

A copy with the fields given replaced.

src/routes.qz:21

def to_s -> String

The route as a line of bezel routes: name, method, pattern, controller and action.

src/routes.qz:28