Module: AgileProxy::Handler

Included in:
ProxyHandler, RequestHandler, StubHandler
Defined in:
lib/agile_proxy/handlers/handler.rb

Overview

A mixin that all handlers must include

Instance Method Summary collapse

Instance Method Details

#call(_env) ⇒ Array

Handles an incoming rack request and returns a rack response.

This method accepts rack request parameters and must return a rack response array containing [status, headers, content] , or [404, {}, ”] if the request cannot be fulfilled.

Parameters:

  • _env (Hash)

    The rack environment

Returns:

  • (Array)

    An array of [status, headers, content] Returns status of 404 if the request cannot be fulfilled.



16
17
18
# File 'lib/agile_proxy/handlers/handler.rb', line 16

def call(_env)
  [500, {}, 'The handler has not overridden the handle_request method!']
end