Class: Net::DNS::RR::A
- Inherits:
-
Net::DNS::RR
- Object
- Net::DNS::RR
- Net::DNS::RR::A
- Defined in:
- lib/net/dns/rr/a.rb
Overview
IPv4 Address Record (A)
Class for DNS IPv4 Address (A) resource records.
The resource data is an IPv4 (i.e. 32 bit long) address, hold in the instance variable address
.
a = Net::DNS::RR::A.new("localhost.movie.edu. 360 IN A 127.0.0.1")
a = Net::DNS::RR::A.new(:name => "localhost.movie.edu.",
:ttl => 360,
:cls => Net::DNS::IN,
:type => Net::DNS::A,
:address => "127.0.0.1" )
When computing binary data to transmit the RR, the RDATA section is an Internet address expressed as four decimal numbers separated by dots without any embedded space (e.g. “10.2.0.52” or “192.0.5.6”).
Constant Summary
Constants inherited from Net::DNS::RR
Constants included from Names
Instance Attribute Summary collapse
-
#address ⇒ Object
Gets the current IPv4 address for this record.
Attributes inherited from Net::DNS::RR
Instance Method Summary collapse
-
#value ⇒ Object
Gets the standardized value for this record, represented by the value of
address
.
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 Attribute Details
#address ⇒ Object
Gets the current IPv4 address for this record.
Returns an instance of IPAddr.
28 29 30 |
# File 'lib/net/dns/rr/a.rb', line 28 def address @address end |
Instance Method Details
#value ⇒ Object
Gets the standardized value for this record, represented by the value of address
.
Returns a String.
49 50 51 |
# File 'lib/net/dns/rr/a.rb', line 49 def value address.to_s end |