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.



4
5
6
# File 'lib/omniauth/test/phony_session.rb', line 4

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



8
9
10
11
12
# File 'lib/omniauth/test/phony_session.rb', line 8

def call(env)
  @session ||= (env['rack.session'] || {})
  env['rack.session'] = @session
  @app.call(env)
end