Module: DNS::ResolveHost::LogAttributes

Defined in:
lib/dns/resolve_host/resolve_host.rb

Class Method Summary collapse

Class Method Details

.get(resolve_host, hostname) ⇒ Object



36
37
38
39
40
41
42
43
44
# File 'lib/dns/resolve_host/resolve_host.rb', line 36

def self.get(resolve_host, hostname)
  if resolve_host.nameserver
    nameserver = resolve_host.nameserver.to_a * ':'
  else
    nameserver = "(system)"
  end

  "Hostname: #{hostname}, Nameserver: #{nameserver}"
end