123456789_123456789_123456789_123456789_123456789_

Class: Gem::Resolv::DNS::SvcParam::Generic

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

Generic SvcParam abstract class.

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

  • #value readonly

    SvcParamValue in wire-format byte string.

Instance Method Summary

Constructor Details

.new(value) ⇒ Generic

[ GitHub ]

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

def initialize(value)
  @value = value
end

Class Method Details

.create(key_number)

[ GitHub ]

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

def self.create(key_number)
  c = Class.new(Generic)
  key_name = :"key#{key_number}"
  c.const_set(:KeyName, key_name)
  c.const_set(:KeyNumber, key_number)
  self.const_set(:"Key#{key_number}", c)
  ClassHash[key_name] = ClassHash[key_number] = c
  return c
end

.decode(msg)

This method is for internal use only.
[ GitHub ]

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

def self.decode(msg) # :nodoc:
  return self.new(msg.get_bytes)
end

Instance Attribute Details

#value (readonly)

SvcParamValue in wire-format byte string.

[ GitHub ]

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

attr_reader :value

Instance Method Details

#encode(msg)

This method is for internal use only.
[ GitHub ]

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

def encode(msg) # :nodoc:
  msg.put_bytes(@value)
end