123456789_123456789_123456789_123456789_123456789_

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

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

Overview

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

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

  • #keys readonly

    Mandatory keys.

Instance Method Summary

Constructor Details

.new(keys) ⇒ Mandatory

Initialize “mandatory” ScvParam.

[ GitHub ]

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

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

Class Method Details

.decode(msg)

This method is for internal use only.
[ GitHub ]

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

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/resolv.rb', line 1890

attr_reader :keys

Instance Method Details

#encode(msg)

This method is for internal use only.
[ GitHub ]

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

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