Skip to content

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

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

Included modules

Athena::Routing::Params::ParamInterface

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, is_nilable : Bool = false, strict : Bool = true, key : String? = nil, description : String? = nil, default : T? = nil, type : T.class = T, converter : Nil? = nil) #

View source

Methods#

#default : T? #

Returns the value that should be used if #strict? is false and the parameter was not provided, defaulting to nil.

#extract_value(request : HTTP::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.