Class: SeaShanty::Faraday::Interceptor

Inherits:
Object
  • Object
show all
Defined in:
lib/sea_shanty/faraday/interceptor.rb

Constant Summary collapse

BUILDER_CLASS_ATTR_NAME =
:builder_class

Instance Method Summary collapse

Instance Method Details

#intercept!(request_store) ⇒ Object



11
12
13
14
# File 'lib/sea_shanty/faraday/interceptor.rb', line 11

def intercept!(request_store)
  Middleware.request_store = request_store
  ::Faraday::ConnectionOptions.memoized(BUILDER_CLASS_ATTR_NAME) { RackBuilder }
end

#removeObject



16
17
18
# File 'lib/sea_shanty/faraday/interceptor.rb', line 16

def remove
  ::Faraday::ConnectionOptions.memoized(BUILDER_CLASS_ATTR_NAME) { ::Faraday::RackBuilder }
end