Class: Hybook::FootballConfig

Inherits:
Config
  • Object
show all
Defined in:
lib/hybook/press/football.rb

Instance Method Summary collapse

Methods inherited from Config

#bookfile_dir, #bookfile_path, #build_dir, #datafile_dir, #datafile_path, #setup

Constructor Details

#initialize(hash) ⇒ FootballConfig



7
# File 'lib/hybook/press/football.rb', line 7

def initialize( hash ) super; end

Instance Method Details

#book_templates_unzip_dirObject

Book Templates rename to book_dir ?? why, why not? - split zip into book_dir and book_templates_dir why? why not?



28
# File 'lib/hybook/press/football.rb', line 28

def book_templates_unzip_dir()  "#{build_dir}/#{collection}/#{setup}/book";  end

#collectionObject



9
# File 'lib/hybook/press/football.rb', line 9

def collection() 'football'; end

#create_db!Object



20
21
22
23
# File 'lib/hybook/press/football.rb', line 20

def create_db!()
  SportDb.create_all
  SportDb.read_builtin   ## note: load built-in datasets (e.g. seasons etc.)
end

#datafile_urlObject

Datafile – remote



14
# File 'lib/hybook/press/football.rb', line 14

def datafile_url() "http://github.com/openfootball/datafile/raw/master/#{setup}.rb"; end

#db_pathObject

Database



18
# File 'lib/hybook/press/football.rb', line 18

def db_path() "#{build_dir}/#{collection}/#{setup}/#{collection}.db"; end