open

SDBM.open(filename, mode = 0666)
SDBM.open(filename, mode = 0666) { |sdbm| ... }
Class Public methods

If called without a block, this is the same as ::new.

If a block is given, the new database will be passed to the block and will be safely closed after the block has executed.

Example:

require 'sdbm'

SDBM.open('my_database') do |db|
  db['hello'] = 'world'
end
doc_ruby_on_rails
2015-05-14 02:52:52
Comments
Leave a Comment

Please login to continue.