Skip to content

struct Athena::Routing::Arguments::Resolvers::RequestAttribute
inherits Struct #

Handles resolving a value that is stored in the request's ART::Request#attributes. This includes any path/query parameters, or custom types values stored via an AED::EventListenerInterface.

@[ARTA::Get("/:id")]
def get_id(id : Int32) : Int32
  id
end

Included modules

Athena::Routing::Arguments::Resolvers::ArgumentValueResolverInterface

Class methods#

.new #

View source

Methods#

#resolve(request : ART::Request, argument : ART::Arguments::ArgumentMetadata) #

Returns a value resolved from the provided request and argument.

View source

#supports?(request : ART::Request, argument : ART::Arguments::ArgumentMetadata) : Bool #

Returns true if self is able to resolve a value from the provided request and argument.

View source