abstract struct Athena::Routing::Params::ScalarParam
inherits Athena::Routing::Params::Param
#
Extension of ART::Params::Param
that allows for more granular validation of scalar parameters.
Direct known subclasses
Athena::Routing::Params::QueryParam(T)
Athena::Routing::Params::RequestParam(T)
Class methods#
.new(name : String, has_default : Bool = false, incompatibles : Array(String)? = nil, requirements : AVD::Constraint | Array(AVD::Constraint) | Regex | Nil = nil, map : Bool = false, strict : Bool = true, nilable : Bool = false, key : String? = nil, description : String? = nil)
#
(name : String, has_default : Bool = false, incompatibles : Array(String)? = nil, requirements : AVD::Constraint | Array(AVD::Constraint) | Regex | Nil = nil, map : Bool = false, strict : Bool = true, nilable : Bool = false, key : String? = nil, description : String? = nil)
Methods#
#map? : Bool
#
: Bool
Denotes whether the #requirements
should be applied to the whole value, or to each item a part of the value.
See the "Map" section of ARTA::QueryParam
.
#requirements : AVD::Constraint | Array(AVD::Constraint) | Regex | Nil
#
: AVD::Constraint | Array(AVD::Constraint) | Regex | Nil
Returns the requirements that the value is required to pass in order to be considered valid.
See the "Requirements" section of ARTA::QueryParam
.