Module: BioLocus::DbMapper
- Defined in:
- lib/bio-locus/dbmapper.rb
Class Method Summary collapse
Class Method Details
.factory(options) ⇒ Object
91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/bio-locus/dbmapper.rb', line 91 def DbMapper::factory dbname = [:db] if File.exist?(dbname) $stderr.print "Database #{dbname} exists!\n" end case [:storage] when :tokyocabinet TokyoCabinetMapper.new(dbname) when :localmemcache MonetaMapper.new(:LocalMemCache,dbname) else SerializeMapper.new(dbname) end end |