class Athena::Routing::Router

Overview

Default implementation of ARTA::RouterInterface.

Included Modules

Defined in:

routing/router.cr

Constructors

Instance Method Summary

Instance methods inherited from module Athena::Routing::RouterInterface

route_collection : ART::RouteCollection route_collection

Instance methods inherited from module Athena::Routing::URLGeneratorInterface

generate(route : String, params : Hash(String, _) | Nil = nil, reference_type : ART::URLGeneratorInterface::ReferenceType = :absolute_path) : String generate

Instance methods inherited from module Athena::Routing::RequestMatcherInterface

match(request : HTTP::Request) : Amber::Router::RoutedResult(Athena::Routing::ActionBase) match

Constructor Detail

def self.new(request_store : ART::RequestStore, base_uri : URI | Nil) #

[View source]

Instance Method Detail

def generate(route : String, params : Hash(String, _) | Nil = nil, reference_type : ART::URLGeneratorInterface::ReferenceType = :absolute_path) : String #

:inherit:


[View source]
def match(request : HTTP::Request) : Amber::Router::RoutedResult(Athena::Routing::ActionBase) #

Matches the provided request with its related ART::Action.

OPTIMIZE Possibly raise a non ART::Exceptions::HTTPException here to allow caller to determine what to do.


[View source]
def route_collection : ART::RouteCollection #

Returns the ART::RouteCollection associated with this router.


[View source]