class URI::CoreFile
Public Class Methods
new(scheme, userinfo, host, port, registry, path, opaque, query, fragment, parser = DEFAULT_PARSER, arg_check = false)
click to toggle source
Calls superclass method
# File lib/file-uri.rb, line 8 def initialize(scheme, userinfo, host, port, registry, path, opaque, query, fragment, parser = DEFAULT_PARSER, arg_check = false) # detect UNC-type paths ("file:////server/Share/dir/file.ext") if !host && path && path =~ %r[\A//+] path = path.sub(%r[\A/+], DBL_SLASH) host = '' # ...urgh elsif path && path =~ %r[\A/+] path = path.sub(%r[\A/+], SLASH) end super(scheme, userinfo, host, port, registry, path, opaque, query, fragment, parser, arg_check) end