Class: Frodo::Middleware

Inherits:
Faraday::Middleware
  • Object
show all
Defined in:
lib/frodo/middleware.rb

Overview

Base class that all middleware can extend. Provides some convenient helper functions.

Defined Under Namespace

Classes: Authentication, Authorization, Caching, CustomHeaders, Gzip, InstanceURL, Logger, Multipart, OdataHeaders, RaiseError

Instance Method Summary collapse

Constructor Details

#initialize(app, client, options) ⇒ Middleware



17
18
19
20
21
# File 'lib/frodo/middleware.rb', line 17

def initialize(app, client, options)
  @app = app
  @client = client
  @options = options
end

Instance Method Details

#clientObject

Internal: Proxy to the client.



24
25
26
# File 'lib/frodo/middleware.rb', line 24

def client
  @client
end

#connectionObject

Internal: Proxy to the client’s faraday connection.



29
30
31
# File 'lib/frodo/middleware.rb', line 29

def connection
  client.send(:connection)
end