Module: Rollday::FaradayConnectionOptions

Defined in:
lib/rollday/client_middleware.rb

Instance Method Summary collapse

Instance Method Details

#new_builder(block) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/rollday/client_middleware.rb', line 5

def new_builder(block)
  super.tap do |builder|
    # allow scope to remove usage of middleware for a request
    # after it has been injected into the Connection
    if Rollday.config.allow_client_middleware
      builder.use(Rollday::MIDDLEWARE_NAME)
    end
  end
end