struct Athena::Routing::Arguments::Resolvers::Request
- Athena::Routing::Arguments::Resolvers::Request
- Struct
- Value
- Object
Overview
Handles resolving a value for action arguments typed as HTTP::Request
.
@[ARTA::Get("/")]
def get_request_path(request : HTTP::Request) : String
request.path
end
Included Modules
Defined in:
arguments/resolvers/request_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.