Class: TocDoc::Response::BaseMiddleware Abstract Private

Inherits:
Faraday::Middleware
  • Object
show all
Defined in:
lib/toc_doc/http/response/base_middleware.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

This class is abstract.

Abstract base class for TocDoc Faraday response middleware.

Subclasses must override #on_complete to inspect or transform the response environment.

Instance Method Summary collapse

Instance Method Details

#on_complete(env)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Called by Faraday after the response has been received.

Parameters:

  • env (Faraday::Env)

    the Faraday response environment

Raises:

  • (NotImplementedError)

    always — subclasses must override



20
21
22
# File 'lib/toc_doc/http/response/base_middleware.rb', line 20

def on_complete(env)
  raise NotImplementedError, "#{self.class} must implement #on_complete"
end