vendor/bundle/ruby/2.7.0/gems/typhoeus-1.4.0/lib/typhoeus/hydra/stubbable.rb
# Override add in order to check for matching expecations.
# When an expecation is found, super is not called. Instead a
# canned response is assigned to the request.
#
# @example Add the request.
#   hydra.add(request)
Override add in order to check for matching expecations.
When an expecation is found, super is not called. Instead a
canned response is assigned to the request.
Override add in order to check for matching expecations . When an expecation is found super is not called . Instead a canned response is assigned to the request .
def add(request)
        if response = Expectation.response_for(request)
          request.execute_headers_callbacks(response)
          request.on_body.each{ |callback| callback.call(response.body, response) }
          request.finish(response)
        else
          super
        end
      end
def add ( request ) if response = Expectation . response_for ( request ) request . execute_headers_callbacks ( response ) request . on_body . each { | callback | callback . call ( response . body , response ) } request . finish ( response ) else super end end
Override add in order to check for matching expecations.
Override add in order to check for matching expecations .
request
<not_specific>
example
Add the request. hydra.add(request)
Add the request . hydra . add ( request )