struct Athena::Routing::Arguments::Resolvers::RequestAttribute

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.cr

Constructors

Instance Method Summary

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

def self.new #

[View source]

Instance Method Detail

def initialize #

[View source]
def resolve(request : HTTP::Request, argument : ART::Arguments::ArgumentMetadata) #

Returns a value resolved from the provided request and argument.


[View source]
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.


[View source]