struct Athena::Routing::Arguments::ArgumentMetadata(T)

Overview

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

Defined in:

arguments/argument_metadata.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, has_default : Bool, is_nilable : Bool = false, default : T | Nil = nil, type : T.class = T) #

[View source]

Instance Method Detail

def default : T | Nil #

The default value of the argument, if any.

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


[View source]
def has_default? : Bool #

If this argument has a default value.


[View source]
def name : String #

The name of the argument.


[View source]
def nilable? : Bool #

If nil is a valid argument for the argument.


[View source]
def type : T.class #

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


[View source]