Skip to content

Instantly share code, notes, and snippets.

@fijimunkii
Last active December 24, 2015 22:59
Show Gist options
  • Save fijimunkii/6876812 to your computer and use it in GitHub Desktop.
Save fijimunkii/6876812 to your computer and use it in GitHub Desktop.
ruby: params from scratch
url = 'http://www.google.com/?q=123&y=2950&z=9500&p=950'
params = {}
query = url.split('?').pop
query.split('&').each do |x| y = x.split('='); params[y[0]] = y[1] end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment