Class: Gem::Resolv::DNS::SvcParam::DoHPath
- Inherits:
-
Gem::Resolv::DNS::SvcParam
- Object
- Gem::Resolv::DNS::SvcParam
- Gem::Resolv::DNS::SvcParam::DoHPath
- Defined in:
- lib/rubygems/vendor/resolv/lib/resolv.rb
Overview
“dohpath” SvcParam – DNS over HTTPS path template [RFC9461]
Constant Summary collapse
- KeyName =
:dohpath
- KeyNumber =
7
Constants inherited from Gem::Resolv::DNS::SvcParam
Instance Attribute Summary collapse
-
#template ⇒ Object
readonly
URI template for DoH queries.
Class Method Summary collapse
-
.decode(msg) ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#encode(msg) ⇒ Object
:nodoc:.
-
#initialize(template) ⇒ DoHPath
constructor
Initialize “dohpath” ScvParam.
Methods inherited from Gem::Resolv::DNS::SvcParam
Constructor Details
#initialize(template) ⇒ DoHPath
Initialize “dohpath” ScvParam.
2075 2076 2077 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2075 def initialize(template) @template = template.encode('utf-8') end |
Instance Attribute Details
#template ⇒ Object (readonly)
URI template for DoH queries.
2070 2071 2072 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2070 def template @template end |
Class Method Details
.decode(msg) ⇒ Object
:nodoc:
2083 2084 2085 2086 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2083 def self.decode(msg) # :nodoc: template = msg.get_bytes.force_encoding('utf-8') return self.new(template) end |
Instance Method Details
#encode(msg) ⇒ Object
:nodoc:
2079 2080 2081 |
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2079 def encode(msg) # :nodoc: msg.put_bytes(@template) end |