Sha256: 91786bf892af8f3629f4dd5ea3f68ab1e6d87913cf18881f8b4e75983add6ee5
Contents?: true
Size: 514 Bytes
Versions: 10
Compression:
Stored size: 514 Bytes
Contents
module Steep module PathHelper module_function def to_pathname(uri, dosish: Gem.win_platform?) uri = URI.parse(uri) if uri.scheme == "file" path = uri.path or raise path.sub!(%r{^/([a-zA-Z])(:|%3A)//?}i, '\1:/') if dosish Pathname(path) end end def to_uri(path, dosish: Gem.win_platform?) str_path = path.to_s if dosish str_path.insert(0, "/") if str_path[0] != "/" end URI::File.build(path: str_path) end end end
Version data entries
10 entries across 10 versions & 1 rubygems