class SportDb::Toolii

Public Class Methods

connect_to_db( options ) click to toggle source
# File lib/sportdb/cli/main.rb, line 31
def self.connect_to_db( options )
  puts "working directory: #{Dir.pwd}"

  SportDb.connect( adapter: 'sqlite3',
                   database: "#{options.db_path}/#{options.db_name}" )

  LogDb.setup  # start logging to db (that is, save logs in logs table in db)
end
logger() click to toggle source
# File lib/sportdb/cli/main.rb, line 25
def self.logger()       @@logger; end
logger=(value) click to toggle source
# File lib/sportdb/cli/main.rb, line 24
def self.logger=(value) @@logger=value; end
opts() click to toggle source
# File lib/sportdb/cli/main.rb, line 29
def self.opts()        @@opts; end
opts=(value) click to toggle source

todo: find a better name e.g. change to settings? config? safe_opts? why? why not?

# File lib/sportdb/cli/main.rb, line 28
def self.opts=(value)  @@opts = value; end