Class: Resolv::DNS::SvcParam::Generic
Do not use. This class is for internal use only.
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
SvcParam
|
|
|
Instance Chain:
self,
SvcParam
|
|
| Inherits: |
SvcParam
|
| Defined in: | lib/resolv.rb |
Overview
Generic SvcParam abstract class.
Class Method Summary
- .create(key_number)
- .decode(msg)
-
.new(value) ⇒ Generic
constructor
Create generic
::Resolv::DNS::SvcParam.
Instance Attribute Summary
-
#value
readonly
SvcParamValue in wire-format byte string.
Instance Method Summary
Constructor Details
.new(value) ⇒ Generic
Create generic ::Resolv::DNS::SvcParam
Class Method Details
.create(key_number)
[ GitHub ]# File 'lib/resolv.rb', line 2029
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) # Not registered in a constant or in ClassHash. ClassHash creates a # class for every unknown SvcParamKey, so registering them # permanently would let a malicious response exhaust memory. return c end
.decode(msg)
[ GitHub ]# File 'lib/resolv.rb', line 2025
def self.decode(msg) # :nodoc: return self.new(msg.get_bytes) end
Instance Attribute Details
#value (readonly)
SvcParamValue in wire-format byte string.
# File 'lib/resolv.rb', line 2012
attr_reader :value
Instance Method Details
#encode(msg)
[ GitHub ]# File 'lib/resolv.rb', line 2021
def encode(msg) # :nodoc: msg.put_bytes(@value) end