gdbm.store(key, value) â value Instance Public methods Associates the value value with the specified key.
gdbm.size â fixnum Instance Public methods Returns the number of key-value pairs in this database.
gdbm.shift â (key, value) or nil Instance Public methods Removes a key-value-pair from this database and returns it as a two-item array [ key, value ]. Returns nil if the database is empty.
gdbm.select { |key, value| block } â array Instance Public methods Returns a new array of all key-value pairs of the database for which block evaluates to true.
gdbm.replace(other) â gdbm Instance Public methods Replaces the content of gdbm with the key-value pairs of other. other must have an #each_pair method.
gdbm.reorganize â gdbm Instance Public methods Reorganizes the database file. This operation removes reserved space of elements that have already been deleted. It is only useful after a lot of deletions in the database.
gdbm.reject! { |key, value| block } â gdbm Instance Public methods Deletes every key-value pair from gdbm for which block evaluates to true.
gdbm.reject { |key, value| block } â hash Instance Public methods Returns a hash copy of gdbm where all key-value pairs from gdbm for which block evaluates to true are removed. See also: delete_if
gdbm.has_key?(k) â true or falsegdbm.key?(k) â true or false Instance Public methods Returns true if the given key k exists within the database. Returns false otherwise.
gdbm.length â fixnum Instance Public methods Returns the number of key-value pairs in this database.
Page 2054 of 2275