module URI

Public Class Methods

parse_possibly_unix_socket(str) click to toggle source
# File lib/nchan_tools/pubsub.rb, line 36
def self.parse_possibly_unix_socket(str)
  u = URI.parse(str)
  if u && u.scheme == "unix"
    m = u.path.match "([^:]*):(.*)"
    if m
      u.set_host_unchecked("#{u.host}#{m[1]}")
      u.path=m[2]
    end
  end
  
  u
end