Class: Gem::Resolv::DNS::SvcParam::IPv6Hint

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

Overview

“ipv6hint” SvcParam – IPv6 address hints

Constant Summary collapse

KeyName =
:ipv6hint
KeyNumber =
6

Constants inherited from Gem::Resolv::DNS::SvcParam

ClassHash

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Gem::Resolv::DNS::SvcParam

key_name, key_number

Constructor Details

#initialize(addresses) ⇒ IPv6Hint

Initialize “ipv6hint” ScvParam.



2043
2044
2045
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2043

def initialize(addresses)
  @addresses = addresses.map {|address| IPv6.create(address) }
end

Instance Attribute Details

#addressesObject (readonly)

Set of IPv6 addresses.



2038
2039
2040
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2038

def addresses
  @addresses
end

Class Method Details

.decode(msg) ⇒ Object

:nodoc:



2053
2054
2055
2056
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2053

def self.decode(msg) # :nodoc:
  addresses = msg.get_list { IPv6.new(msg.get_bytes(16)) }
  return self.new(addresses)
end

Instance Method Details

#encode(msg) ⇒ Object

:nodoc:



2047
2048
2049
2050
2051
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2047

def encode(msg) # :nodoc:
  @addresses.each do |address|
    msg.put_bytes(address.address)
  end
end