Struct to hold url attributes you care about
Posted on November 28, 2013
Parsing urls can be quite annoying. Ruby’s URI#parse and CGI#parse do a lot of the heavy lifting, they often don’t give you exactly what you want in a convenient format.
Never fear! Struct to the rescue. Create a quick struct that formats the url (and caches it!) exactly how you need it.
Got something to say?