Class: Moneta::Adapters::SDBM

Inherits:
Moneta::Adapter show all
Includes:
CreateSupport, DBMAdapter, EachKeySupport, IncrementSupport
Defined in:
lib/moneta/adapters/sdbm.rb

Overview

SDBM backend

Instance Attribute Summary

Attributes included from HashAdapter

#backend

Attributes inherited from Moneta::Adapter

#backend

Instance Method Summary collapse

Methods included from EachKeySupport

#each_key, included

Methods included from CreateSupport

#create, included

Methods included from IncrementSupport

included, #increment

Methods included from DBMAdapter

#close, #merge!

Methods included from HashAdapter

#clear, #delete, #fetch_values, #key?, #load, #merge!, #slice, #store, #values_at

Methods inherited from Moneta::Adapter

backend, backend_block, backend_required?

Methods included from Config

#config, included

Methods included from Defaults

#[], #[]=, #close, #create, #decrement, #each_key, #features, #fetch, #fetch_values, included, #increment, #key?, #merge!, #slice, #supports?, #update, #values_at

Methods included from OptionSupport

#expires, #prefix, #raw, #with

Constructor Details

#initialize(options = {}) ⇒ Object

Parameters:

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

Options Hash (options):

  • :file (String)

    Database file

  • :backend (::SDBM)

    Use existing backend instance



17
# File 'lib/moneta/adapters/sdbm.rb', line 17

backend { |file:| ::SDBM.new(file) }