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.
Methods
def method -> String
"GET", "POST", ...
def pattern -> String
The path pattern.
def controller -> Type[Bezel::Controller]
The controller.
def action -> Symbol
The action, a public method of the controller taking and returning a
Conn.
def pipelines -> Array[Symbol]
The pipelines the request goes through first, outermost first.
def name -> String?
The route's name, or nil.
def params -> Array[Symbol]
The names of the pattern's parameters, in order ([:post_id, :id]).
def to_h -> Hash[Symbol, Object]
The fields as a Hash, by name.
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.
def to_s -> String
The route as a line of bezel routes: name, method, pattern,
controller and action.