Skip to content

struct Athena::Routing::Arguments::ArgumentMetadata(T)
inherits Struct #

Represents a controller action argument. Stores metadata associated with it, such as its name, type, and default value if any.

Class methods#

.new(name : String, has_default : Bool, is_nilable : Bool = false, default : T? = nil, type : T.class = T) #

View source

Methods#

#default : T? #

The default value of the argument, if any.

See ART::Arguments::Resolvers::DefaultValue.

View source

#has_default? : Bool #

If this argument has a default value.

View source

#name : String #

The name of the argument.

View source

#nilable? : Bool #

If nil is a valid argument for the argument.

View source

#type : T.class #

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

View source