Class: Bizflow::Repos::Repo

Inherits:
Object
  • Object
show all
Defined in:
lib/bizflow/repos/repo.rb

Class Method Summary collapse

Class Method Details

.connect(db_path) ⇒ Object



9
10
11
12
# File 'lib/bizflow/repos/repo.rb', line 9

def self.connect(db_path)
  @@connection ||= Sequel.connect("sqlite://#{db_path}")
  Dir[File.expand_path("../../data_model/*.rb", __FILE__)].each { |file| require_relative file }
end

.connectionObject



14
15
16
# File 'lib/bizflow/repos/repo.rb', line 14

def self.connection
  @@connection
end