Class: Bookfile::FootballDef
- Defined in:
- lib/bookfile/database/database.rb
Overview
change to FootballDatabase or DatabaseFootball - why, why not???
Instance Method Summary collapse
-
#initialize(db_config) ⇒ FootballDef
constructor
check - if it works by default (no initialze specfied).
-
#prepare ⇒ Object
change to require - why, why not??.
Methods inherited from Database
Constructor Details
#initialize(db_config) ⇒ FootballDef
check - if it works by default (no initialze specfied)
90 91 92 |
# File 'lib/bookfile/database/database.rb', line 90 def initialize( db_config ) ## check - if it works by default (no initialze specfied) super end |
Instance Method Details
#prepare ⇒ Object
change to require - why, why not??
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/bookfile/database/database.rb', line 94 def prepare ## change to require - why, why not?? puts "setup football: #{@db_config.inspect}" res = require 'sportdb/models' ## also add to xxxx ??? ## (possible to include as globals ???? how - Object.send :include ???) or ## Module.send :include ?? if res == false ## find a better check - check for constants defined??? if not define??? ## or use constant_missing handler??? puts " todo/fix: SportDb::Models already included ??" end ## for now always include puts " include SportDb::Models" ### check/fix: include as globals/top-level!!! how? possible??? Builder.send :include, SportDb::Models PageCtx.send :include, SportDb::Models HybookHelper.send :include, SportDb::Models ## constants not accesible (include in module too) end |