title: Adding `params` and `session` and `env` to Object
body: <p>In a gem I'm writing I am trying to add the rack methods <code>params</code>, <code>session</code>, and <code>env</code> to <code>Object</code> so that they can be accessed and modified by the user of the gem. I have tried using <code>Object.instance_variable_set</code> and <code>Object.instance_variable_get</code> to add the variables to <code>Object</code> and then set them again by retrieving them from <code>Object</code>. I have been using the <code>Rack::Request.new(env)</code> interface to do this. The only problem is that it seems to be impossible to set <code>params</code> and <code>session</code> through this object. This has led be to believe that I am doing something very wrong. How can I set <code>params</code> and <code>session</code> through <code>Rack::Request</code>? Please also let me know if what I'm doing is bad practice or if there is a better way of doing it.</p>