Method: RTunnel::SocketFactory.split_address
- Defined in:
- lib/rtunnel/socket_factory.rb
.split_address(address) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/rtunnel/socket_factory.rb', line 4 def self.split_address(address) port_index = address.index /[^:]\:[^:]/ if port_index [address[0, port_index + 1], address[port_index + 2, address.length]] else [address, nil] end end |