Class: Bookman::FootballConfig
Instance Method Summary collapse
-
#book_templates_unzip_dir ⇒ Object
Book Templates rename to book_dir ?? why, why not? - split zip into book_dir and book_templates_dir why? why not?.
-
#bookfile_url ⇒ Object
Bookfile – remote.
- #collection ⇒ Object
- #create_db! ⇒ Object
-
#datafile_url ⇒ Object
Datafile – remote.
-
#db_path ⇒ Object
Database.
-
#initialize(hash) ⇒ FootballConfig
constructor
A new instance of FootballConfig.
Methods inherited from Config
#bookfile_dir, #bookfile_path, #build_dir, #datafile_dir, #datafile_path, #setup
Constructor Details
#initialize(hash) ⇒ FootballConfig
Returns a new instance of FootballConfig.
7 |
# File 'lib/bookman/football.rb', line 7 def initialize( hash ) super; end |
Instance Method Details
#book_templates_unzip_dir ⇒ Object
Book Templates rename to book_dir ?? why, why not? - split zip into book_dir and book_templates_dir why? why not?
37 |
# File 'lib/bookman/football.rb', line 37 def book_templates_unzip_dir() "#{build_dir}/#{collection}/#{setup}/book"; end |
#bookfile_url ⇒ Object
Bookfile – remote
14 15 16 17 18 |
# File 'lib/bookman/football.rb', line 14 def bookfile_url() ## note: for now always return football.rb ## use setup/layout-specific bookfiles?? allow selection of package,how?? why,why not?? "http://github.com/book-templates/bookfile/raw/master/football.rb" end |
#collection ⇒ Object
9 |
# File 'lib/bookman/football.rb', line 9 def collection() 'football'; end |
#create_db! ⇒ Object
29 30 31 32 |
# File 'lib/bookman/football.rb', line 29 def create_db!() SportDb.create_all SportDb.read_builtin ## note: load built-in datasets (e.g. seasons etc.) end |
#datafile_url ⇒ Object
Datafile – remote
23 |
# File 'lib/bookman/football.rb', line 23 def datafile_url() "http://github.com/openfootball/datafile/raw/master/#{setup}.rb"; end |
#db_path ⇒ Object
Database
27 |
# File 'lib/bookman/football.rb', line 27 def db_path() "#{build_dir}/#{collection}/#{setup}/#{collection}.db"; end |