Class: Resolv::DNS::SvcParam::DoHPath
- Inherits:
-
SvcParam
- Object
- 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
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.
Constructor Details
#initialize(template) ⇒ DoHPath
Initialize "dohpath" ScvParam.
2167 2168 2169 |
# File 'lib/resolv.rb', line 2167 def initialize(template) @template = template.encode('utf-8') end |
Instance Attribute Details
#template ⇒ Object (readonly)
URI template for DoH queries.
2162 2163 2164 |
# File 'lib/resolv.rb', line 2162 def template @template end |
Class Method Details
.decode(msg) ⇒ Object
:nodoc:
2175 2176 2177 2178 |
# File 'lib/resolv.rb', line 2175 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:
2171 2172 2173 |
# File 'lib/resolv.rb', line 2171 def encode(msg) # :nodoc: msg.put_bytes(@template) end |