ArgumentMetadata
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)
(name : String, has_default : Bool, is_nilable : Bool = false, default : T? = nil, type : T.class = T)
Methods
#default : T?
: T?
The default value of the argument, if any.
#has_default? : Bool
: Bool
If this argument has a default value.
#name : String
: String
The name of the argument.
#nilable? : Bool
: Bool
If nil
is a valid argument for the argument.
#type : T.class
: T.class
The type of the parameter, i.e. what its type restriction is.