Class: Middleman::DnsResolver::LocalLinkResolver

Inherits:
BasicNetworkResolver show all
Defined in:
middleman-core/lib/middleman-core/dns_resolver/local_link_resolver.rb

Overview

Use network name server to resolve ips and names

Instance Method Summary collapse

Methods inherited from BasicNetworkResolver

#getaddresses, #getnames

Constructor Details

#initialize(options_hash = ::Middleman::EMPTY_HASH) ⇒ LocalLinkResolver

Returns a new instance of LocalLinkResolver.


9
10
11
12
13
14
15
16
# File 'middleman-core/lib/middleman-core/dns_resolver/local_link_resolver.rb', line 9

def initialize(options_hash = ::Middleman::EMPTY_HASH)
  super

  @timeouts = options_hash.fetch(:timeouts, 1)
  @resolver = options_hash.fetch(:resolver, Resolv::MDNS.new(nameserver_config))

  self.timeouts = timeouts
end