Class: Resolv::DNS::SvcParam::DoHPath
- Inherits:
-
Resolv::DNS::SvcParam
- Object
- Resolv::DNS::SvcParam
- Resolv::DNS::SvcParam::DoHPath
- Defined in:
- lib/resolv.rb
Overview
“dohpath” SvcParam – DNS over HTTPS path template [RFC9461]
Constant Summary collapse
- KeyName =
:dohpath
- KeyNumber =
7
Constants inherited from 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 Resolv::DNS::SvcParam
Constructor Details
#initialize(template) ⇒ DoHPath
Initialize “dohpath” ScvParam.
2072 2073 2074 |
# File 'lib/resolv.rb', line 2072 def initialize(template) @template = template.encode('utf-8') end |
Instance Attribute Details
#template ⇒ Object (readonly)
URI template for DoH queries.
2067 2068 2069 |
# File 'lib/resolv.rb', line 2067 def template @template end |
Class Method Details
.decode(msg) ⇒ Object
:nodoc:
2080 2081 2082 2083 |
# File 'lib/resolv.rb', line 2080 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:
2076 2077 2078 |
# File 'lib/resolv.rb', line 2076 def encode(msg) # :nodoc: msg.put_bytes(@template) end |