title: Access current URI of Nokogiri HTML Document
body: <p>I need to access the url of the page I am currently on (which is saved as an Nokogiri HTML Document) to fetch certain parameters from it. Here is what I've tried:</p>
  
  <pre><code>agent = Mechanize.new
  page = agent.get('some.url.com/?parameter1=234').parser
  page.uri.match(/\/\?parameter1=(\d*)/)[1].to_s
  </code></pre>
  
  <p>As you can see I want to extract the value of the parameter1.</p>
  
  <p>Any thoughts on how to go about that will be much appreciated!</p>
  
  <p>NOTE!
  It's not an option o remove the .parser method, since I need it further down in the script.</p>