Class: Cachew::Adapters::HashAdapter

Inherits:
BaseAdapter
  • Object
show all
Defined in:
lib/cachew/adapters/hash_adapter.rb

Instance Attribute Summary

Attributes inherited from BaseAdapter

#store

Instance Method Summary collapse

Instance Method Details

#get(key) ⇒ Object



8
9
10
# File 'lib/cachew/adapters/hash_adapter.rb', line 8

def get(key)
  store[key]
end

#has?(key) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/cachew/adapters/hash_adapter.rb', line 12

def has?(key)
  store.key?(key)
end

#set(key, value) ⇒ Object



4
5
6
# File 'lib/cachew/adapters/hash_adapter.rb', line 4

def set(key, value)
  store[key] = value
end