123456789_123456789_123456789_123456789_123456789_

Class: Gem::Resolv::DNS::SvcParam::Mandatory

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

“mandatory” ::Gem::Resolv::DNS::SvcParamMandatory keys in service binding RR

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

  • #keys readonly

    Mandatory keys.

Instance Method Summary

Constructor Details

.new(keys) ⇒ Mandatory

Initialize “mandatory” ScvParam.

[ GitHub ]

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

def initialize(keys)
  @keys = keys.map(&:to_int)
end

Class Method Details

.decode(msg)

This method is for internal use only.
[ GitHub ]

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

def self.decode(msg) # :nodoc:
  keys = msg.get_list { msg.get_unpack('n')[0] }
  return self.new(keys)
end

Instance Attribute Details

#keys (readonly)

Mandatory keys.

[ GitHub ]

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

attr_reader :keys

Instance Method Details

#encode(msg)

This method is for internal use only.
[ GitHub ]

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

def encode(msg) # :nodoc:
  @keys.sort.each do |key|
    msg.put_pack('n', key)
  end
end