Class: Clearance::RackSession
- Inherits:
-
Object
- Object
- Clearance::RackSession
- Defined in:
- lib/clearance/rack_session.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ RackSession
constructor
A new instance of RackSession.
Constructor Details
#initialize(app) ⇒ RackSession
Returns a new instance of RackSession.
3 4 5 |
# File 'lib/clearance/rack_session.rb', line 3 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/clearance/rack_session.rb', line 7 def call(env) session = Clearance::Session.new(env) env[:clearance] = session response = @app.call(env) session. response[1] response end |