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, _controller : Controller.class, _return_type : ReturnType.class)
#
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::Interface
s and/or ATH::Listeners
s.
#controller : Controller.class
#
Returns the ATH::Controller
that this action is a part of.
#execute(arguments : Array) : ReturnType
#
Executes this action with the provided arguments array.
#parameters : ParametersType
#
Returns a tuple of ATH::Controller::ParameterMetadata
representing the parameters this action expects.