abstract struct Athena::Routing::Params::ScalarParam

Overview

Extension of ART::Params::Param that allows for more granular validation of scalar parameters.

Direct Known Subclasses

Defined in:

params/scalar_param.cr

Constructors

Instance Method Summary

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

[View source]

Instance Method Detail

def constraints : Array(AVD::Constraint) #

:inherit:


[View source]
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.


[View source]
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.

See ART::QueryParam@requirements.


[View source]