Class: Warden::Test::Mock::Session

Inherits:
Object
  • Object
show all
Defined in:
lib/warden/test/mock.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app, _configs = {}) ⇒ Session

Returns a new instance of Session.



58
59
60
# File 'lib/warden/test/mock.rb', line 58

def initialize(app, _configs={})
  @app = app
end

Instance Attribute Details

#appObject

Returns the value of attribute app.



57
58
59
# File 'lib/warden/test/mock.rb', line 57

def app
  @app
end

Instance Method Details

#call(e) ⇒ Object



62
63
64
65
# File 'lib/warden/test/mock.rb', line 62

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