Sha256: 93aae5f0f82f9f87b112ec19880fe428fe302c8dccd23b6e2dad00347629e3ea

Contents?: true

Size: 1.06 KB

Versions: 1

Compression:

Stored size: 1.06 KB

Contents

# encoding: utf-8

require 'pp'
require 'date'
require 'fileutils'


## 3rd party gems
require 'alphabets'      # downcase_i18n, unaccent, variants, ...
require 'csvreader'

def read_csv( path )
  CsvHash.read( path, :header_converters => :symbol )
end

def parse_csv( txt )
  CsvHash.parse( txt, :header_converters => :symbol )
end


###
# our own code
require 'sportdb/formats/version' # let version always go first
require 'sportdb/formats/outline_reader'
require 'sportdb/formats/datafile'
require 'sportdb/formats/season_utils'



## let's put test configuration in its own namespace / module
module SportDb
class Test    ## todo/check: works with module too? use a module - why? why not?

  ####
  #  todo/fix:  find a better way to configure shared test datasets - why? why not?
  #    note: use one-up (..) directory for now as default - why? why not?
  def self.data_dir()        @data_dir ||= '../test'; end
  def self.data_dir=( path ) @data_dir = path; end
end
end   # module SportDb



puts SportDb::Formats.banner   # say hello

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sportdb-formats-0.1.1 lib/sportdb/formats.rb