title: Accessing session in Sinatra Middleware
body: <p>I am working on a Sinatra Project and have set some variables in the session for later usage.</p>
  
  <p>The scenario for which I need help for is that I want to access the session object in a middleware class. I am using warden for authentication.</p>
  
  <p>I want to do something similar below in the Middleware class:</p>
  
  <pre class="lang-ruby prettyprint-override"><code>class MyMiddleware
      def initialize(app, options={})
          @app = app
      end
  
      def call(env)
          puts "#{session.inspect}" 
      end
  end
  </code></pre>
  
  <p>Is there a possibility for doing that?</p>
  
  <p>Thoughts?</p>