Module: URI
- Defined in:
- lib/nchan_tools/pubsub.rb
Defined Under Namespace
Classes: Generic
Class Method Summary collapse
Class Method Details
.parse_possibly_unix_socket(str) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 |
# 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 |