struct Athena::Routing::Route(Controller, ActionType, ReturnType, ArgTypeTuple, ArgumentsType)

Overview

Represents an endpoint within the application.

Includes metadata about the endpoint, such as its controller, arguments, return type, and the action should be executed.

Defined in:

athena.cr

Constructors

Instance Method Summary

Instance methods inherited from struct Athena::Routing::Action

initialize initialize

Constructor methods inherited from struct Athena::Routing::Action

new new

Constructor Detail

def self.new(action : ActionType, action_name : String, method : String, arguments : ArgumentsType, param_converters : Array(ART::ParamConverterInterface::ConfigurationInterface), _controller : Controller.class, _return_type : ReturnType.class, _arg_types : ArgTypeTuple.class) #

[View source]

Instance Method Detail

def action_name : String #

The name of the the controller action related to self.


[View source]
def arguments : ArgumentsType #

An Array(ART::Arguments::ArgumentMetadata) that self requires.


[View source]
def controller : Controller.class #

The ART::Controller that includes self.


[View source]
def execute(arguments : Array) : ReturnType #

Executes the action related to self with the provided arguments array.


[View source]
def method : String #

The HTTP method associated with self.


[View source]

An Array(ART::ParamConverterInterface::ConfigurationInterface) representing the ART::ParamConverters applied to self.


[View source]
def return_type : ReturnType.class #

The type that self's route should return.


[View source]