url = 'http://www.foocorp.com/foo/bar' URI.parse(url).host # => www.foocorp.com. Note that this will raise an error if the given argument is not a URL.
確定! 回上一頁