struct Athena::Routing::Arguments::Resolvers::RequestAttribute
- Athena::Routing::Arguments::Resolvers::RequestAttribute
- Struct
- Value
- Object
Overview
Handles resolving a value that is stored in the request's ART::ParameterBag
.
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
Defined in:
arguments/resolvers/request_attribute_value_resolver.crConstructors
Instance Method Summary
- #initialize
-
#resolve(request : HTTP::Request, argument : ART::Arguments::ArgumentMetadata)
Returns a value resolved from the provided request and argument.
-
#supports?(request : HTTP::Request, argument : ART::Arguments::ArgumentMetadata) : Bool
Returns
true
ifself
is able to resolve a value from the provided request and argument.
Instance methods inherited from module Athena::Routing::Arguments::Resolvers::ArgumentValueResolverInterface
resolve(request : HTTP::Request, argument : ART::Arguments::ArgumentMetadata)
resolve,
supports?(request : HTTP::Request, argument : ART::Arguments::ArgumentMetadata) : Bool
supports?
Constructor Detail
Instance Method Detail
def resolve(request : HTTP::Request, argument : ART::Arguments::ArgumentMetadata)
#
Returns a value resolved from the provided request and argument.
def supports?(request : HTTP::Request, argument : ART::Arguments::ArgumentMetadata) : Bool
#
Returns true
if self
is able to resolve a value from the provided request and argument.