Class: OmniAuth::Test::PhonySession

Inherits:
Object
  • Object
show all
Defined in:
lib/omniauth/test/phony_session.rb

Instance Method Summary collapse

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