Class: Rack::Session::Store
- Inherits:
-
Object
- Object
- Rack::Session::Store
- Defined in:
- lib/rack_session_store.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, options = {}) ⇒ Store
constructor
A new instance of Store.
Constructor Details
#initialize(app, options = {}) ⇒ Store
Returns a new instance of Store.
13 14 15 16 17 |
# File 'lib/rack_session_store.rb', line 13 def initialize(app, = {}) @app = app @options = { key: 'rack.session', expire_after: 3600 }.merge() _telemetry_init end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
11 12 13 |
# File 'lib/rack_session_store.rb', line 11 def @options end |
Instance Method Details
#call(env) ⇒ Object
19 20 21 22 23 |
# File 'lib/rack_session_store.rb', line 19 def call(env) env['rack.session'] ||= {} env['rack.session.options'] ||= @options.dup @app.call(env) end |