Class: Net::DNS::RR::AAAA
- Inherits:
-
Net::DNS::RR
- Object
- Net::DNS::RR
- Net::DNS::RR::AAAA
- Defined in:
- lib/net/dns/rr/aaaa.rb
Overview
IPv6 Address Record (AAAA)
Class for DNS IPv6 Address (AAAA) resource records.
Constant Summary
Constants inherited from Net::DNS::RR
Constants included from Names
Instance Method Summary collapse
-
#address ⇒ Object
Gets the current IPv6 address for this record.
-
#address=(string_or_ipaddr) ⇒ Object
Assigns a new IPv6 address to this record, which can be in the form of a
String
or anIPAddr
object. -
#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, #name, parse, parse_packet, #rdata, #to_a, #to_s, #ttl, #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
#address ⇒ Object
Gets the current IPv6 address for this record.
Returns an instance of IPAddr.
15 16 17 |
# File 'lib/net/dns/rr/aaaa.rb', line 15 def address @address end |
#address=(string_or_ipaddr) ⇒ Object
Assigns a new IPv6 address to this record, which can be in the form of a String
or an IPAddr
object.
Examples
a.address = "192.168.0.1"
a.address = IPAddr.new("10.0.0.1")
Returns the new allocated instance of IPAddr.
28 29 30 31 32 |
# File 'lib/net/dns/rr/aaaa.rb', line 28 def address=(string_or_ipaddr) @address = check_address(string_or_ipaddr) build_pack @address end |
#value ⇒ Object
Gets the standardized value for this record, represented by the value of address
.
Returns a String.
38 39 40 |
# File 'lib/net/dns/rr/aaaa.rb', line 38 def value address.to_s end |