sdbm.to_a â Array
Instance Public methods
Returns a new Array containing each key-value pair in the database.
Example:
require 'sdbm'
SDBM.open 'my_database' do |db|
db.update('apple' => 'fruit', 'spinach' => 'vegetable')
db.to_a #=> [["apple", "fruit"], ["spinach", "vegetable"]]
end
Please login to continue.