Class: Supabase::Auth::MemoryStorage
- Inherits:
-
SupportedStorage
- Object
- SupportedStorage
- Supabase::Auth::MemoryStorage
- Defined in:
- lib/supabase/auth/memory_storage.rb
Instance Attribute Summary collapse
-
#storage ⇒ Object
readonly
Returns the value of attribute storage.
Instance Method Summary collapse
- #get_item(key) ⇒ Object
-
#initialize ⇒ MemoryStorage
constructor
A new instance of MemoryStorage.
- #remove_item(key) ⇒ Object
- #set_item(key, value) ⇒ Object
Constructor Details
#initialize ⇒ MemoryStorage
Returns a new instance of MemoryStorage.
8 9 10 |
# File 'lib/supabase/auth/memory_storage.rb', line 8 def initialize @storage = {} end |
Instance Attribute Details
#storage ⇒ Object (readonly)
Returns the value of attribute storage.
6 7 8 |
# File 'lib/supabase/auth/memory_storage.rb', line 6 def storage @storage end |
Instance Method Details
#get_item(key) ⇒ Object
12 13 14 |
# File 'lib/supabase/auth/memory_storage.rb', line 12 def get_item(key) @storage[key] end |
#remove_item(key) ⇒ Object
20 21 22 |
# File 'lib/supabase/auth/memory_storage.rb', line 20 def remove_item(key) @storage.delete(key) end |
#set_item(key, value) ⇒ Object
16 17 18 |
# File 'lib/supabase/auth/memory_storage.rb', line 16 def set_item(key, value) @storage[key] = value end |