Class: DNS::ResourceRecord::IN::A

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

Overview

+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                    ADDRESS                    |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+

where:

ADDRESS A 32 bit Internet address.

Hosts that have multiple Internet addresses will have multiple A records.

A records cause no additional section processing. The RDATA section of an A line in a master file is an Internet address expressed as four decimal numbers separated by dots without any imbedded spaces (e.g., “10.2.0.52” or “192.0.5.6”). ++

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Data

parse

Constructor Details

#initialize(what) ⇒ A

Returns a new instance of A.



58
59
60
# File 'lib/faildns/resourcerecord/IN/A.rb', line 58

def initialize (what)
  @ip = IP.new(what)
end

Instance Attribute Details

#ipObject (readonly)

Returns the value of attribute ip.



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

def ip
  @ip
end

Class Method Details

._parse(string, original) ⇒ Object



48
49
50
# File 'lib/faildns/resourcerecord/IN/A.rb', line 48

def self._parse (string, original)
  A.new(IP.parse(string))
end

.lengthObject



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

def self.length
  4
end

Instance Method Details

#packObject



62
63
64
# File 'lib/faildns/resourcerecord/IN/A.rb', line 62

def pack
  @ip.pack
end

#to_sObject



66
67
68
# File 'lib/faildns/resourcerecord/IN/A.rb', line 66

def to_s
  @ip.to_s
end