title: State object once and retrieve multiple attributes
body: <p>Here is a snippet from a Sinatra app where users will be submitting urls. I must ensure that <code>http://</code> is prepended to the url in order to route outside my application. How can I state <code>site</code> once and access it's attributes? (Line 3)</p>
  
  <pre><code>  p.params= "www.ruby-lang.org/en/"
    site = URI(p.params[:url])
    site = "http://" + site.host + site.path + site.query 
  </code></pre>