class Radbas::Routing::Router(T)

Defined in:

radbas-routing/router.cr

Constant Summary

MAX_CACHE_SIZE = 1024_u16

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def build(route : Symbol, args : NamedTuple | Nil = nil) : String #

[View source]
def has?(route : Symbol) : Bool #

[View source]
def map(methods : Array(String), path : String, handler : T, name : Symbol | Nil = nil) : self #

[View source]
def match(method : String, path : String, params = {} of String => String) : Result(T) #

[View source]
def match(request : HTTP::Request) : Result(T) #

[View source]
def set_validator(name : Symbol, validator : Validator) : self #

[View source]
def tokenize(path : String) : Array(String) #

[View source]