Class: Restforce::Middleware
- Inherits:
-
Faraday::Middleware
- Object
- Faraday::Middleware
- Restforce::Middleware
- Defined in:
- lib/restforce/middleware.rb
Overview
Base class that all middleware can extend. Provides some convenient helper functions.
Direct Known Subclasses
Defined Under Namespace
Classes: Authentication, Authorization, Caching, Gzip, InstanceURL, Logger, Mashify, Multipart, RaiseError
Instance Method Summary collapse
-
#client ⇒ Object
Internal: Proxy to the client.
-
#connection ⇒ Object
Internal: Proxy to the client’s faraday connection.
-
#initialize(app, client, options) ⇒ Middleware
constructor
A new instance of Middleware.
Constructor Details
#initialize(app, client, options) ⇒ Middleware
Returns a new instance of Middleware.
15 16 17 |
# File 'lib/restforce/middleware.rb', line 15 def initialize(app, client, ) @app, @client, @options = app, client, end |
Instance Method Details
#client ⇒ Object
Internal: Proxy to the client.
20 21 22 |
# File 'lib/restforce/middleware.rb', line 20 def client @client end |
#connection ⇒ Object
Internal: Proxy to the client’s faraday connection.
25 26 27 |
# File 'lib/restforce/middleware.rb', line 25 def connection client.send(:connection) end |