Class: Supabase::Auth::MemoryStorage

Inherits:
SupportedStorage show all
Defined in:
lib/supabase/auth/memory_storage.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMemoryStorage

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

#storageObject (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