class Handler < Struct

Inherits from
Struct

A content-type handler and its response block.

Definitions

def call(context, request, media_range, *arguments, **options)

Invoke this handler's block in the controller context.

Signature

parameter context Object

The context.

parameter request Utopia::Request

The request.

parameter media_range Protocol::HTTP::Header::Accept::MediaRange

The negotiated media range.

parameter arguments Array

The arguments.

parameter options Hash

The options.

returns Object

The handler block's result.

Implementation

def call(context, request, media_range, *arguments, **options)
	context.instance_exec(media_range, *arguments, **options, &self.block)
end