Skip to content

struct Athena::Framework::Action(Controller, ReturnType, ParameterTypeTuple, ParametersType)
inherits Athena::Framework::ActionBase #

Represents a controller action that will handle a request.

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

Constructors#

.new(action : Proc(ParameterTypeTuple, ReturnType), parameters : ParametersType, annotation_configurations : ADI::AnnotationConfigurations, params : Array(ATH::Params::ParamInterface), _controller : Controller.class, _return_type : ReturnType.class)#

View source

Methods#

#annotation_configurations : ADI::AnnotationConfigurations#

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

These configurations could then be accessed within ATHR::Interfaces and/or ATH::Listenerss.

View source

#controller : Controller.class#

Returns the ATH::Controller that this action is a part of.

View source

#execute(arguments : Array) : ReturnType#

Executes this action with the provided arguments array.

View source

#parameters : ParametersType#

Returns a tuple of ATH::Controller::ParameterMetadata representing the parameters this action expects.

View source

#params : Array(ATH::Params::ParamInterface)#

View source

#return_type : ReturnType.class#

Returns the type that this action returns.

View source