Class: BetterAuth::RequestState::State
- Inherits:
-
Struct
- Object
- Struct
- BetterAuth::RequestState::State
- Defined in:
- lib/better_auth/request_state.rb
Instance Attribute Summary collapse
-
#initializer ⇒ Object
Returns the value of attribute initializer.
-
#ref ⇒ Object
Returns the value of attribute ref.
Instance Method Summary collapse
Instance Attribute Details
#initializer ⇒ Object
Returns the value of attribute initializer
7 8 9 |
# File 'lib/better_auth/request_state.rb', line 7 def initializer @initializer end |
#ref ⇒ Object
Returns the value of attribute ref
7 8 9 |
# File 'lib/better_auth/request_state.rb', line 7 def ref @ref end |
Instance Method Details
#get ⇒ Object
8 9 10 11 12 |
# File 'lib/better_auth/request_state.rb', line 8 def get store = RequestState.current_store store[ref] = initializer.call unless store.key?(ref) store[ref] end |
#set(value) ⇒ Object
14 15 16 |
# File 'lib/better_auth/request_state.rb', line 14 def set(value) RequestState.current_store[ref] = value end |