Skip to content

struct Athena::Routing::Action(Controller, ActionType, ReturnType, ArgTypeTuple, ArgumentsType)
inherits Athena::Routing::ActionBase #

Represents an endpoint within the application.

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

Class methods#

.new(action : ActionType, name : String, method : String, path : String, constraints : Hash(String, Regex), arguments : ArgumentsType, param_converters : Array(ART::ParamConverterInterface::ConfigurationInterface), view_context : ART::Action::ViewContext, annotation_configurations : ACF::AnnotationConfigurations, params : Array(ART::Params::ParamInterface), _controller : Controller.class, _return_type : ReturnType.class, _arg_types : ArgTypeTuple.class) #

View source

Methods#

#annotation_configurations : ACF::AnnotationConfigurations #

Returns annotation configurations registered via Athena::Config.configuration_annotation and applied to self.

These configurations could then be accessed within ART::ParamConverterInterfaces and/or ART::Listenerss. See ART::Events::RequestAware for an example.

View source

#arguments : ArgumentsType #

Returns an Array(ART::Arguments::ArgumentMetadata) that self requires.

View source

#constraints : Hash(String, Regex) #

Returns any routing constraints related to self.

View source

#controller : Controller.class #

The ART::Controller that includes self.

View source

#execute(arguments : Array) : ReturnType #

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

View source

#method : String #

Returns the HTTP method associated with self.

View source

#name : String #

Returns the name of the the controller action related to self.

View source

#param_converters : Array(ART::ParamConverterInterface::ConfigurationInterface) #

Returns an Array(ART::ParamConverterInterface::ConfigurationInterface) representing the ARTA::ParamConverters applied to self.

View source

#path : String #

Returns the URL path related to self.

View source

#return_type : ReturnType.class #

The type that self's route should return.

View source

#view_context : ART::Action::ViewContext #

Returns the ART::Action::ViewContext related to self.

View source