Module: Net::DNS

Included in:
MDNS::QueryImp, MDNS::Service
Defined in:
lib/net/dns.rb,
lib/net/dns/mdns.rb,
lib/net/dns/mdns-sd.rb

Overview

DNS exposes some of Resolv::DNS from resolv.rb to make them easier to use outside of the context of the Resolv class and it’s DNS resolver - such as in MDNS. In particular, Net::DNS can be included so that full names to DNS classes in Resolv::DNS can be imported into your namespace.

Defined Under Namespace

Modules: IN, MDNS, MDNSSD

Constant Summary collapse

Message =
Resolv::DNS::Message
Name =
Resolv::DNS::Name
DecodeError =
Resolv::DNS::DecodeError

Class Method Summary collapse

Class Method Details

.rrname(rr) ⇒ Object

Returns the resource record name of rr as a short string (“IN::A”, …).



42
43
44
45
46
# File 'lib/net/dns.rb', line 42

def self.rrname(rr)
  rr = rr.class unless rr.class == Class
  rr = rr.to_s.sub(/.*Resource::/, '')
  rr = rr.to_s.sub(/.*DNS::/, '')
end