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

Inherits:
Gem::Resolv::DNS::Resource show all
Defined in:
lib/rubygems/vendor/resolv/lib/resolv.rb

Overview

An IPv6 address record.

Constant Summary collapse

TypeValue =
28
ClassValue =
IN::ClassValue

Constants inherited from Gem::Resolv::DNS::Resource

ClassHash, ClassInsensitiveTypes

Instance Attribute Summary collapse

Attributes inherited from Gem::Resolv::DNS::Resource

#ttl

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Gem::Resolv::DNS::Resource

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

Constructor Details

#initialize(address) ⇒ AAAA

Creates a new AAAA for address.



2723
2724
2725
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2723

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

Instance Attribute Details

#addressObject (readonly)

The Gem::Resolv::IPv6 address for this AAAA.



2730
2731
2732
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2730

def address
  @address
end

Class Method Details

.decode_rdata(msg) ⇒ Object

:nodoc:



2736
2737
2738
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2736

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

Instance Method Details

#encode_rdata(msg) ⇒ Object

:nodoc:



2732
2733
2734
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2732

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