Class: ActionDispatch::Session::AbstractStore::OptionsHash
- Inherits:
-
Hash
- Object
- Hash
- ActionDispatch::Session::AbstractStore::OptionsHash
- Defined in:
- lib/action_dispatch/middleware/session/abstract_store.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
A new instance of OptionsHash.
Constructor Details
#initialize(by, env, default_options) ⇒ OptionsHash
Returns a new instance of OptionsHash.
18 19 20 21 22 23 |
# File 'lib/action_dispatch/middleware/session/abstract_store.rb', line 18 def initialize(by, env, ) @by = by @env = env @session_id_loaded = false merge!() end |
Instance Method Details
#[](key) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/action_dispatch/middleware/session/abstract_store.rb', line 25 def [](key) if key == :id load_session_id! unless key?(:id) || has_session_id? end super end |