dbm.keys â array Instance Public methods Returns an array of all the string keys in the database.
dbm.length â integer Instance Public methods Returns the number of entries in the database.
dbm.has_key?(key) â boolean Instance Public methods Returns true if the database contains the specified key, false otherwise.
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.
dbm.reject! {|key, value| block} â self Instance Public methods Deletes all entries for which the code block returns true. Returns self.
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.
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.
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.
dbm.store(key, value) â value Instance Public methods Stores the specified string value in the database, indexed via the string key provided.
Page 162 of 11844