Class: ActionController::Session::AbstractStore::OptionsHash
- Defined in:
- lib/action_controller/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.
15 16 17 18 19 20 |
# File 'lib/action_controller/session/abstract_store.rb', line 15 def initialize(by, env, ) @by = by @env = env @session_id_loaded = false merge!() end |
Instance Method Details
#[](key) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/action_controller/session/abstract_store.rb', line 22 def [](key) if key == :id load_session_id! unless super(:id) || has_session_id? end super(key) end |