Class: DNS::ResourceRecord::IN::PTR

Inherits:
Data
  • Object
show all
Defined in:
lib/faildns/resourcerecord/IN/PTR.rb

Overview

+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
/                   PTRDNAME                    /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+

where:

PTRDNAME A <domain-name> which points to some location in the

domain name space.

PTR records cause no additional section processing. These RRs are used in special domains to point to some other location in the domain space. These records are simple data, and don’t imply any special processing similar to that performed by CNAME, which identifies aliases. See the description of the IN-ADDR.ARPA domain for an example. ++

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Data

parse

Constructor Details

#initialize(domain) ⇒ PTR

Returns a new instance of PTR.



52
53
54
# File 'lib/faildns/resourcerecord/IN/PTR.rb', line 52

def initialize (domain)
  @domain = domain
end

Instance Attribute Details

#domainObject (readonly)

Returns the value of attribute domain.



50
51
52
# File 'lib/faildns/resourcerecord/IN/PTR.rb', line 50

def domain
  @domain
end

Class Method Details

._parse(string, original) ⇒ Object



46
47
48
# File 'lib/faildns/resourcerecord/IN/PTR.rb', line 46

def self._parse (string, original)
  PTR.new(DomainName.parse(string.clone, original))
end

Instance Method Details

#packObject



56
57
58
# File 'lib/faildns/resourcerecord/IN/PTR.rb', line 56

def pack
  @domain.pack
end

#to_sObject



60
61
62
# File 'lib/faildns/resourcerecord/IN/PTR.rb', line 60

def to_s
  @domain.to_s
end