Class: Resolv::DNS::SvcParam::Generic
- Inherits:
-
Resolv::DNS::SvcParam
- Object
- Resolv::DNS::SvcParam
- Resolv::DNS::SvcParam::Generic
- Defined in:
- lib/resolv.rb
Overview
Generic SvcParam abstract class.
Constant Summary
Constants inherited from Resolv::DNS::SvcParam
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
SvcParamValue in wire-format byte string.
Class Method Summary collapse
Instance Method Summary collapse
-
#encode(msg) ⇒ Object
:nodoc:.
-
#initialize(value) ⇒ Generic
constructor
Create generic SvcParam.
Methods inherited from Resolv::DNS::SvcParam
Constructor Details
#initialize(value) ⇒ Generic
Create generic SvcParam
1861 1862 1863 |
# File 'lib/resolv.rb', line 1861 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
SvcParamValue in wire-format byte string.
1856 1857 1858 |
# File 'lib/resolv.rb', line 1856 def value @value end |
Class Method Details
.create(key_number) ⇒ Object
1873 1874 1875 1876 1877 1878 1879 1880 1881 |
# File 'lib/resolv.rb', line 1873 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) ⇒ Object
:nodoc:
1869 1870 1871 |
# File 'lib/resolv.rb', line 1869 def self.decode(msg) # :nodoc: return self.new(msg.get_bytes) end |
Instance Method Details
#encode(msg) ⇒ Object
:nodoc:
1865 1866 1867 |
# File 'lib/resolv.rb', line 1865 def encode(msg) # :nodoc: msg.put_bytes(@value) end |