123456789_123456789_123456789_123456789_123456789_

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

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Resolv::DNS::SvcParam
Defined in: lib/resolv.rb

Overview

“ipv6hint” ::Resolv::DNS::SvcParam::Resolv::IPv6 address hints

Constant Summary

::Resolv::DNS::SvcParam - Inherited

ClassHash

Class Method Summary

::Resolv::DNS::SvcParam - Inherited

.key_name

Get the presentation name of the SvcParamKey.

.key_number

Get the registered number of the SvcParamKey.

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(addresses) ⇒ IPv6Hint

Initialize “ipv6hint” ScvParam.

[ GitHub ]

  
# File 'lib/resolv.rb', line 2035

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

Class Method Details

.decode(msg)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/resolv.rb', line 2045

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

Instance Attribute Details

#addresses (readonly)

Set of ::Resolv::IPv6 addresses.

[ GitHub ]

  
# File 'lib/resolv.rb', line 2030

attr_reader :addresses

Instance Method Details

#encode(msg)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/resolv.rb', line 2039

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