module BioLocus::DbMapper

Public Class Methods

factory(options) click to toggle source
# File lib/bio-locus/dbmapper.rb, line 91
def DbMapper::factory options
  dbname = options[:db]
  if File.exist?(dbname)
    $stderr.print "Database #{dbname} exists!\n"
  end
  case options[:storage]
    when :tokyocabinet
      TokyoCabinetMapper.new(dbname)
    when :localmemcache
      MonetaMapper.new(:LocalMemCache,dbname)
    else
      SerializeMapper.new(dbname)
  end
end