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.


No Replies to "Struct to hold url attributes you care about"


    Got something to say?

    Some html is OK

    This site uses Akismet to reduce spam. Learn how your comment data is processed.