Skip to content

Instantly share code, notes, and snippets.

@defunkt
Forked from simonjefford/gist:6856
Created August 22, 2008 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save defunkt/6857 to your computer and use it in GitHub Desktop.
Save defunkt/6857 to your computer and use it in GitHub Desktop.
module URI
def self.parse_with_options(uri_str, opts = {})
parsed_uri = self.parse(uri_str)
sing = (class << parsed_uri; self end)
sing.send :define_method, :options do
opts
end
parsed_uri
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment