vendor/bundle/ruby/2.7.0/gems/typhoeus-1.4.0/lib/typhoeus/hydra/memoizable.rb
# Overrides add in order to check before if request
# is memoizable and already in memory. If thats the case,
# super is not called, instead the response is set and
# the on_complete callback called.
#
# @example Add the request.
#   hydra.add(request)
#
# @param [ Request ] request The request to add.
#
# @return [ Request ] The added request.
Overrides add in order to check before if request
is memoizable and already in memory. If thats the case,
super is not called, instead the response is set and
the on_complete callback called.
Overrides add in order to check before if request is memoizable and already in memory . If thats the case super is not called instead the response is set and the on_complete callback called .
def add(request)
        if request.memoizable? && memory.has_key?(request)
          response = memory[request]
          request.finish(response, true)
          dequeue
        else
          super
        end
      end
def add ( request ) if request . memoizable? && memory . has_key? ( request ) response = memory [ request ] request . finish ( response , true ) dequeue else super end end
Overrides add in order to check before if request
is memoizable and already in memory.
Overrides add in order to check before if request is memoizable and already in memory .
The added request.
The added request .
 Request 
request
<not_specific>
<not_specific>
request The request to add.
request The request to add .
example
Add the request. hydra.add(request)
Add the request . hydra . add ( request )