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
contextObject The context.
-
parameter
requestUtopia::Request The request.
-
parameter
media_rangeProtocol::HTTP::Header::Accept::MediaRange The negotiated media range.
-
parameter
argumentsArray The arguments.
-
parameter
optionsHash 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