End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
URI.register_scheme
register_scheme(scheme, klass)
lib/uri/common.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/uri/common.rb, line 76
def self.register_scheme(scheme, klass)
Schemes.const_set(scheme.to_s.upcase, klass)
end
Register the given klass to be instantiated when parsing URLs with the given scheme. Note that currently only schemes which after .upcase are valid constant names can be registered (no -/+/. allowed).