keys

dbm.keys â array Instance Public methods Returns an array of all the string keys in the database.

length

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

member?

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

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.

reject!

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

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.

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.

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.

size

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

store

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