Class: Net::DNS::RR::PTR

Inherits:
Net::DNS::RR show all
Defined in:
lib/net/dns/rr/ptr.rb

Overview

Pointer Record (PTR)

Class for DNS Pointer (PTR) resource records.

Pointer records are the opposite of A and AAAA RRs and are used in Reverse Map zone files to map an IP address (IPv4 or IPv6) to a host name.

Constant Summary

Constants inherited from Net::DNS::RR

RRFIXEDSZ, RR_REGEXP

Constants included from Names

Names::INT16SZ

Instance Attribute Summary

Attributes inherited from Net::DNS::RR

#name, #rdata, #ttl

Instance Method Summary collapse

Methods inherited from Net::DNS::RR

#cls, #comp_data, #data, #initialize, #inspect, parse, parse_packet, #to_a, #to_s, #type

Methods included from Names

#dn_comp, #dn_expand, #names_array, #pack_name, #valid?

Constructor Details

This class inherits a constructor from Net::DNS::RR

Instance Method Details

#ptrdnameObject Also known as: ptr

Gets the PTR value.

Returns a String.



17
18
19
# File 'lib/net/dns/rr/ptr.rb', line 17

def ptrdname
  @ptrdname.to_s
end

#valueObject

Gets the standardized value for this record, represented by the value of ptrdname.

Returns a String.



27
28
29
# File 'lib/net/dns/rr/ptr.rb', line 27

def value
  ptrdname.to_s
end