Class: OmniAuth::Test::PhonySession
- Inherits:
-
Object
- Object
- OmniAuth::Test::PhonySession
- Defined in:
- lib/omniauth/test/phony_session.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ PhonySession
constructor
A new instance of PhonySession.
Constructor Details
#initialize(app) ⇒ PhonySession
Returns a new instance of PhonySession.
2 |
# File 'lib/omniauth/test/phony_session.rb', line 2 def initialize(app); @app = app end |
Instance Method Details
#call(env) ⇒ Object
3 4 5 6 7 |
# File 'lib/omniauth/test/phony_session.rb', line 3 def call(env) @session ||= (env['rack.session'] || {}) env['rack.session'] = @session @app.call(env) end |