Skip to content

struct Athena::Framework::Params::QueryParam(T)
inherits Athena::Framework::Params::ScalarParam #

Represents a request's query parameter. See ATHA::QueryParam.

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)#

View source

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.

View source

#type : T.class#

The type of the parameter, i.e. what its type restriction is.