Method: HTTPX::Resolver::HTTPS#initialize
- Defined in:
- lib/httpx/resolver/https.rb
#initialize(_, options) ⇒ HTTPS
Returns a new instance of HTTPS.
37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/httpx/resolver/https.rb', line 37 def initialize(_, ) super @resolver_options = DEFAULTS.merge(@options.) @queries = {} @requests = {} @_timeouts = Array(@resolver_options[:timeouts]) @timeouts = Hash.new { |timeouts, host| timeouts[host] = @_timeouts.dup } @uri = URI(@resolver_options[:uri]) @name = @uri_addresses = nil @resolver = Resolv::DNS.new @resolver.timeouts = @_timeouts.empty? ? Resolver::RESOLVE_TIMEOUT : @_timeouts @resolver.lazy_initialize end |