Class: Moneta::Adapters::Memory

Inherits:
Hash
  • Object
show all
Includes:
Defaults
Defined in:
lib/moneta/adapters/memory.rb

Instance Method Summary collapse

Methods included from Defaults

#[]=, #fetch

Instance Method Details

#[](key) ⇒ Object



6
7
8
# File 'lib/moneta/adapters/memory.rb', line 6

def [](key)
  deserialize(super(key_for(key)))
end

#delete(key, *args) ⇒ Object



18
19
20
# File 'lib/moneta/adapters/memory.rb', line 18

def delete(key, *args)
  deserialize(super(key_for(key), *args))
end

#key?(key) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/moneta/adapters/memory.rb', line 10

def key?(key, *)
  super(key_for(key))
end

#store(key, value, *args) ⇒ Object



14
15
16
# File 'lib/moneta/adapters/memory.rb', line 14

def store(key, value, *args)
  super(key_for(key), serialize(value), *args)
end