123456789_123456789_123456789_123456789_123456789_

Class: Gem::Resolv::DNS::SvcParam::IPv4Hint

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

Overview

“ipv4hint” ::Gem::Resolv::DNS::SvcParam::Gem::Resolv::IPv4 address hints

Constant Summary

::Gem::Resolv::DNS::SvcParam - Inherited

ClassHash

Class Method Summary

::Gem::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) ⇒ IPv4Hint

Initialize “ipv4hint” ScvParam.

[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2008

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

Class Method Details

.decode(msg)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2018

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

Instance Attribute Details

#addresses (readonly)

Set of ::Gem::Resolv::IPv4 addresses.

[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2003

attr_reader :addresses

Instance Method Details

#encode(msg)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2012

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