Class: Gem::Resolv::DNS::SvcParam::Generic
- Inherits:
-
Gem::Resolv::DNS::SvcParam
- Object
- Gem::Resolv::DNS::SvcParam
- Gem::Resolv::DNS::SvcParam::Generic
- Defined in:
- lib/rubygems/vendor/resolv/lib/resolv.rb
Overview
Generic SvcParam abstract class.
Constant Summary
Constants inherited from Gem::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 Gem::Resolv::DNS::SvcParam
Constructor Details
#initialize(value) ⇒ Generic
Create generic SvcParam
1864 1865 1866 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1864 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
SvcParamValue in wire-format byte string.
1859 1860 1861 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1859 def value @value end |
Class Method Details
.create(key_number) ⇒ Object
1876 1877 1878 1879 1880 1881 1882 1883 1884 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1876 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:
1872 1873 1874 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1872 def self.decode(msg) # :nodoc: return self.new(msg.get_bytes) end |
Instance Method Details
#encode(msg) ⇒ Object
:nodoc:
1868 1869 1870 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1868 def encode(msg) # :nodoc: msg.put_bytes(@value) end |