Class: Middleman::DnsResolver::LocalLinkResolver

Inherits:
BasicNetworkResolver show all
Defined in:
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(opts = {}) ⇒ LocalLinkResolver

Returns a new instance of LocalLinkResolver.



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

def initialize(opts={})
  super

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

  self.timeouts = timeouts
end