Class: Rack::Session::Abstract::OptionsHash
- Inherits:
-
Hash
- Object
- Hash
- Rack::Session::Abstract::OptionsHash
- Defined in:
- lib/rack/session/abstract/id.rb
Overview
Thin wrapper around Hash that allows us to lazily load session id into session_options.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(by, env, default_options) ⇒ OptionsHash
constructor
:nodoc:.
Constructor Details
#initialize(by, env, default_options) ⇒ OptionsHash
:nodoc:
24 25 26 27 28 29 |
# File 'lib/rack/session/abstract/id.rb', line 24 def initialize(by, env, ) @by = by @env = env @session_id_loaded = false merge!() end |
Instance Method Details
#[](key) ⇒ Object
31 32 33 34 |
# File 'lib/rack/session/abstract/id.rb', line 31 def [](key) load_session_id! if key == :id && session_id_not_loaded? super end |