Sha256: 22a058d0bb5906e488d3902440da388219f3f41123b66fecedea47d21f0d5308
Contents?: true
Size: 626 Bytes
Versions: 13
Compression:
Stored size: 626 Bytes
Contents
require "sdbm" module Moneta module Adapters class SDBM < ::SDBM include Moneta::Defaults def initialize(options = {}) raise "No :file options specified" unless file = options[:file] super(file) end def [](key) if val = super(key_for(key)) deserialize(val) end end def store(key, value, *) super(key_for(key), serialize(value)) end def key?(key, *) super(key_for(key)) end def delete(key, *) if val = super(key_for(key)) deserialize(val) end end end end end
Version data entries
13 entries across 13 versions & 3 rubygems