123456789_123456789_123456789_123456789_123456789_

Class: Gem::Resolv::DNS::SvcParam::DoHPath

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Gem::Resolv::DNS::SvcParam
Defined in: lib/rubygems/vendor/resolv/lib/resolv.rb

Overview

“dohpath” ::Gem::Resolv::DNS::SvcParam::Gem::Resolv::DNS over HTTPS path template [RFC9461]

Constant Summary

::Gem::Resolv::DNS::SvcParam - Inherited

ClassHash

Class Method Summary

::Gem::Resolv::DNS::SvcParam - Inherited

.key_name

Get the presentation name of the SvcParamKey.

.key_number

Get the registered number of the SvcParamKey.

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(template) ⇒ DoHPath

Initialize “dohpath” ScvParam.

[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2060

def initialize(template)
  @template = template.encode('utf-8')
end

Class Method Details

.decode(msg)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2068

def self.decode(msg) # :nodoc:
  template = msg.get_bytes.force_encoding('utf-8')
  return self.new(template)
end

Instance Attribute Details

#template (readonly)

::Gem::URI template for DoH queries.

[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2055

attr_reader :template

Instance Method Details

#encode(msg)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 2064

def encode(msg) # :nodoc:
  msg.put_bytes(@template)
end