Skip to content

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

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

Constructors#

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

View source

Methods#

#annotation_configurations #

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

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

View source

#arguments #

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

View source

#constraints #

Returns any routing constraints related to self.

View source

#controller #

The ATH::Controller that includes self.

View source

#execute(arguments : Array) : ReturnType #

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

View source

#method #

Returns the HTTP method associated with self.

View source

#name #

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

View source

#param_converters #

Returns a Tuple of ATH::ParamConverter::ConfigurationInterface representing the ATHA::ParamConverters applied to self.

View source

#params #

View source

#path #

Returns the URL path related to self.

View source

#return_type #

The type that self's route should return.

View source