dbm.to_hash â hash Instance Public methods Converts the contents of the database to an in-memory Hash object, and returns it.
dbm.to_a â array Instance Public methods Converts the contents of the database to an array of [key, value] arrays, and returns it.
dbm.store(key, value) â value Instance Public methods Stores the specified string value in the database, indexed via the string key provided.
dbm.length â integer Instance Public methods Returns the number of entries in the database.
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.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.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.reject! {|key, value| block} â self Instance Public methods Deletes all entries for which the code block returns true. Returns self.
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.has_key?(key) â boolean Instance Public methods Returns true if the database contains the specified key, false otherwise.
Page 2170 of 2275