to_hash

dbm.to_hash â hash Instance Public methods Converts the contents of the database to an in-memory Hash object, and returns it.

to_a

dbm.to_a â array Instance Public methods Converts the contents of the database to an array of [key, value] arrays, and returns it.

store

dbm.store(key, value) â value Instance Public methods Stores the specified string value in the database, indexed via the string key provided.

size

dbm.length â integer Instance Public methods Returns the number of entries in the database.

shift

dbm.shift() â [key, value] Instance Public methods Removes a [key, value] pair from the database, and returns it. If the database is empty, returns nil. The order in which values are removed/returned is not guaranteed.

select

dbm.select {|key, value| block} â array Instance Public methods Returns a new array consisting of the [key, value] pairs for which the code block returns true.

replace

dbm.replace(obj) Instance Public methods Replaces the contents of the database with the contents of the specified object. Takes any object which implements the #each_pair method, including Hash and DBM objects.

reject!

dbm.reject! {|key, value| block} â self Instance Public methods Deletes all entries for which the code block returns true. Returns self.

reject

dbm.reject {|key,value| block} â Hash Instance Public methods Converts the contents of the database to an in-memory Hash, then calls Hash#reject with the specified code block, returning a new Hash.

member?

dbm.has_key?(key) â boolean Instance Public methods Returns true if the database contains the specified key, false otherwise.