class

Marten::Template::ContextProducer::Request

Inherits Marten::Template::ContextProducer / Reference / Object

Context producer that adds the HTTP request object to the context, in a request variable.

Instance methods

produce(request : HTTP::Request | Nil = nil)

Returns a hash of values to include in a template context.

The method must return a hash or named tuple if there are values to return, otherwise it can also return nil if it can't produce any values.

Source