# File lib/storage/dbmstore.rb, line 29 def initialize(dbfile) super() @dbfile = "#{dbfile}" # check if database exists and build it if not build_database log.info "Loading world..." # open database and sets @dbtop to highest object id @db = DBM.open(@dbfile, 0666) @db.each_key do |o| @dbtop = o.to_i if o.to_i > @dbtop end @cache = CacheManager.new(@db) log.info "Database '#{@dbfile}' loaded...highest id = #{@dbtop}." # log.debug @db.inspect rescue log.fatal $! raise end