Flowdock
method

to_a

Importance_1
v2_5_5 - Show latest stable - 0 notes - Class: SDBM
to_a() public

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
Show source
Register or log in to add new notes.