instance method
URI::RFC2396_Parser#make_regexp
(?::Array[::String] schemes) -> ::Regexp
make_regexp(schemes = nil)
lib/uri/rfc2396_parser.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/uri/rfc2396_parser.rb, line 261
def make_regexp(schemes = nil)
unless schemes
@regexp[:ABS_URI_REF]
else
/(?=(?i:#{Regexp.union(*schemes).source}):)#{@pattern[:X_ABS_URI]}/x
end
end
Returns Regexp that is default self.regexp[:ABS_URI_REF], unless schemes is provided. Then it is a Regexp.union with self.pattern[:X_ABS_URI].