annotation Athena::Routing::Annotations::ParamConverter
Overview
Applies an ART::ParamConverterInterface
to a given argument.
See ART::ParamConverterInterface
for more information on defining a param converter.
Fields
- name :
String
- The name of the argument that should be converted, may also be provided as the first positional argument. - converter :
ART::ParamConverterInterface.class
- TheART::ParamConverterInterface
that should be used to convert this argument.
Example
@[ARTA::Get(path: "/multiply/:num")]
@[ARTA::ParamConverter("num", converter: MultiplyConverter)]
def multiply(num : Int32) : Int32
num
end