Class: Resolv::DNS::Resource::IN::AAAA

Inherits:
Resolv::DNS::Resource show all
Defined in:
lib/net/dns/resolv.rb

Constant Summary

Constants inherited from Resolv::DNS::Resource

ClassHash, ClassInsensitiveTypes, ClassValue

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Resolv::DNS::Resource

#==, #eql?, get_class, #hash

Constructor Details

#initialize(address) ⇒ AAAA

Returns a new instance of AAAA.



1759
1760
1761
# File 'lib/net/dns/resolv.rb', line 1759

def initialize(address)
  @address = IPv6.create(address)
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



1762
1763
1764
# File 'lib/net/dns/resolv.rb', line 1762

def address
  @address
end

Class Method Details

.decode_rdata(msg) ⇒ Object

:nodoc:



1768
1769
1770
# File 'lib/net/dns/resolv.rb', line 1768

def self.decode_rdata(msg) # :nodoc:
  return self.new(IPv6.new(msg.get_bytes(16)))
end

Instance Method Details

#encode_rdata(msg) ⇒ Object

:nodoc:



1764
1765
1766
# File 'lib/net/dns/resolv.rb', line 1764

def encode_rdata(msg) # :nodoc:
  msg.put_bytes(@address.address)
end