I'm looking for a method to reliably extract the host name from a URL string in Ruby.
e.g. http://www.mglenn.com/directory = www.mglenn.com OR http://www.mglenn.com?param=x = www.mglenn.com
I'm looking for a method to reliably extract the host name from a URL string in Ruby.
e.g. http://www.mglenn.com/directory = www.mglenn.com OR http://www.mglenn.com?param=x = www.mglenn.com