Class: Moneta::Adapters::GDBM
- Inherits:
-
Object
- Object
- Moneta::Adapters::GDBM
- Includes:
- CreateSupport, DBMAdapter, Defaults, EachKeySupport, IncrementSupport
- Defined in:
- lib/moneta/adapters/gdbm.rb
Overview
GDBM backend
Instance Attribute Summary
Attributes included from HashAdapter
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ GDBM
constructor
A new instance of GDBM.
Methods included from EachKeySupport
Methods included from CreateSupport
Methods included from IncrementSupport
Methods included from DBMAdapter
Methods included from HashAdapter
#clear, #delete, #fetch_values, #key?, #load, #merge!, #slice, #store, #values_at
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 = {}) ⇒ GDBM
Returns a new instance of GDBM.
17 18 19 20 21 22 23 |
# File 'lib/moneta/adapters/gdbm.rb', line 17 def initialize( = {}) @backend = [:backend] || begin raise ArgumentError, 'Option :file is required' unless [:file] ::GDBM.new([:file]) end end |