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
1849 1850 1851 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1849 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
SvcParamValue in wire-format byte string.
1844 1845 1846 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1844 def value @value end |
Class Method Details
.create(key_number) ⇒ Object
1861 1862 1863 1864 1865 1866 1867 1868 1869 |
# 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) ⇒ Object
:nodoc:
1857 1858 1859 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1857 def self.decode(msg) # :nodoc: return self.new(msg.get_bytes) end |
Instance Method Details
#encode(msg) ⇒ Object
:nodoc:
1853 1854 1855 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1853 def encode(msg) # :nodoc: msg.put_bytes(@value) end |