Class: Moneta::Adapters::Memory

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

Overview

Memory backend using a hash to store the entries

Direct Known Subclasses

Cookie, DBM, GDBM, LevelDB, SDBM, TokyoCabinet

Instance Method Summary collapse

Methods included from IncrementSupport

#increment

Methods included from HashAdapter

#clear, #delete, #key?, #load, #store

Methods included from Defaults

#[], #[]=, #close, #decrement, #fetch, #increment, #key?

Methods included from OptionSupport

#expires, #prefix, #raw, #with

Constructor Details

#initialize(options = {}) ⇒ Memory

Returns a new instance of Memory.

Parameters:

  • options (Hash) (defaults to: {})

    Options hash



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

def initialize(options = {})
  @hash = {}
end