struct Athena::Framework::Params::RequestParam(T)
inherits Athena::Framework::Params::ScalarParam
#
Represents form data with a request's body. See ATHA::RequestParam
.
Included modules
Athena::Framework::Params::ParamInterface
Constructors#
.new(name : String, has_default : Bool = false, incompatibles : Array(String) | Nil = nil, requirements : AVD::Constraint | Array(AVD::Constraint) | Regex | Nil = nil, map : Bool = false, is_nilable : Bool = false, strict : Bool = true, key : String | Nil = nil, description : String | Nil = nil, default : T | Nil = nil, type : T.class = T, converter : Nil | Nil = nil)
#
Methods#
#default : T | ::Nil
#
Returns the value that should be used if #strict?
is false and the parameter was not provided, defaulting to nil
.
#extract_value(request : ATH::Request, default : _ = nil)
#
Returns the self
's value from the provided request, or default if it was not present.
#type : T.class
#
The type of the parameter, i.e. what its type restriction is.