annotation Athena::Routing::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
@[ART::Get(path: "/multiply/:num")]
@[ART::ParamConverter("num", converter: MultiplyConverter)]
def multiply(num : Int32) : Int32
num
end