This needs to be “native” to the way Hanami::Action operates, so: explicit receivers, no implicit state.
Maybe it just hangs off the request?
def handle(request, response)
request.respond_to do |format|
format.json do
# ...
end
end
end
Either way, we of course have control over what goes into the request/response objects before they get passed into #handle, so we can set them up to have the information they need to expose this API.
This needs to be “native” to the way
Hanami::Actionoperates, so: explicit receivers, no implicit state.Maybe it just hangs off the request?
Either way, we of course have control over what goes into the
request/responseobjects before they get passed into#handle, so we can set them up to have the information they need to expose this API.