Class: Jeka::Analysis::Database

Inherits:
Object
  • Object
show all
Defined in:
lib/jeka/analysis/database.rb

Class Method Summary collapse

Class Method Details

.create(path) ⇒ Object



4
5
6
7
8
# File 'lib/jeka/analysis/database.rb', line 4

def self.create(path)
  DataMapper.finalize
  self.open(path)
  DataMapper.auto_migrate!
end

.open(path) ⇒ Object



10
11
12
# File 'lib/jeka/analysis/database.rb', line 10

def self.open(path)
  DataMapper.setup(:default, "sqlite://#{path}")
end