module LHC::BasicMethodsConcern::ClassMethods
def parallel_requests(options)
def parallel_requests(options) hydra = Typhoeus::Hydra.new # do not use memoization ! requests = [] options.each do |option| request = LHC::Request.new(option, false) requests << request hydra.queue request.raw unless request.response.present? end hydra.run requests.map(&:response) end
def request(options)
def request(options) if options.is_a? Array parallel_requests(options) else LHC::Request.new(options).response end end