Method: Net::DNS::RR.parse

Defined in:
lib/net/dns/rr.rb

.parse(data) ⇒ Object

Return a new RR object of the correct type (like Net::DNS::RR::A if the type is A) from a binary string, usually obtained from network stream.

This method is used when parsing a binary packet by the Packet class.



136
137
138
139
140
# File 'lib/net/dns/rr.rb', line 136

def RR.parse(data)
  o = allocate
  obj, offset = o.send(:new_from_binary, data, 0)
  obj
end