vendor/bundle/ruby/2.7.0/gems/typhoeus-1.4.0/lib/typhoeus/hydra/before.rb
# Overrride add in order to execute callbacks in
# Typhoeus.before. Will break and return when a
# callback returns nil, false or a response. Calls super
# otherwise.
#
# @example Add the request.
#   hydra.add(request)
Overrride add in order to execute callbacks in
Typhoeus.before. Will break and return when a
callback returns nil, false or a response. Calls super
otherwise.
Overrride add in order to execute callbacks in Typhoeus . before . Will break and return when a callback returns nil false or a response . Calls super otherwise .
def add(request)
        Typhoeus.before.each do |callback|
          value = callback.call(request)
          if value.nil? || value == false || value.is_a?(Response)
            dequeue
            return value
          end
        end
        super
      end
def add ( request ) Typhoeus . before . each do | callback | value = callback . call ( request ) if value . nil? || value == false || value . is_a? ( Response ) dequeue return value end end super end
Overrride add in order to execute callbacks in
Typhoeus.before.
Overrride add in order to execute callbacks in Typhoeus . before .
request
<not_specific>
example
Add the request. hydra.add(request)
Add the request . hydra . add ( request )