abstract struct Athena::Routing::Params::ScalarParam
- Athena::Routing::Params::ScalarParam
- Athena::Routing::Params::Param
- Struct
- Value
- Object
Overview
Extension of ART::Params::Param
that allows for more granular validation of scalar parameters.
Direct Known Subclasses
Defined in:
params/scalar_param.crConstructors
Instance Method Summary
-
#constraints : Array(AVD::Constraint)
:inherit:
-
#map? : Bool
Denotes whether the
#requirements
should be applied to the whole value, or to each item a part of the value. -
#requirements : AVD::Constraint | Array(AVD::Constraint) | Regex | Nil
Returns the requirements that the value is required to pass in order to be considered valid.
Instance methods inherited from struct Athena::Routing::Params::Param
constraints : Array(AVD::Constraint)
constraints,
description : String | Nil
description,
has_default? : Bool
has_default?,
incompatibles : Array(String) | Nil
incompatibles,
key : String
key,
name : String
name,
nilable? : Bool
nilable?,
strict? : Bool
strict?
Constructor methods inherited from struct Athena::Routing::Params::Param
new(name : String, has_default : Bool = false, incompatibles : Array(String) | Nil = nil, strict : Bool = true, nilable : Bool = false, key : String | Nil = nil, description : String | Nil = nil)
new
Constructor Detail
def self.new(name : String, has_default : Bool = false, incompatibles : Array(String) | Nil = nil, requirements : AVD::Constraint | Array(AVD::Constraint) | Regex | Nil = nil, map : Bool = false, strict : Bool = true, nilable : Bool = false, key : String | Nil = nil, description : String | Nil = nil)
#
Instance Method Detail
def map? : Bool
#
Denotes whether the #requirements
should be applied to the whole value, or to each item a part of the value.
See ART::QueryParam@map.
def requirements : AVD::Constraint | Array(AVD::Constraint) | Regex | Nil
#
Returns the requirements that the value is required to pass in order to be considered valid.