This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Given a url string, such as "http://www.google.com/search?q=kittens", write a method in ruby which returns a hash of the constituent parts of the URL. The hash should include the protocol, the subdomain(s), the domain, the path, and the query parameters. |