class Handler
A content-type handler and its response block.
Definitions
def split(*arguments)
Delegate content-type splitting to this handler's content type.
Signature
-
parameter
argumentsArray The arguments.
-
returns
Array The resulting values.
Implementation
def split(*arguments)
self.content_type.split(*arguments)
end
def call(context, request, media_range, *arguments, **options)
Invoke this handler's block in the controller context.
Signature
-
parameter
contextObject The context.
-
parameter
requestRack::Request The request.
-
parameter
media_rangeHTTP::Accept::MediaTypes::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