class Bookfile::WorldDef
Public Class Methods
new( db_config )
click to toggle source
Calls superclass method
Bookfile::Database::new
# File lib/bookfile/database/database.rb, line 26 def initialize( db_config ) ## check - if it works by default (no initialze specfied) super end
Public Instance Methods
prepare()
click to toggle source
# File lib/bookfile/database/database.rb, line 30 def prepare ## change to require - why, why not?? puts "setup world: #{@db_config.inspect}" res = require 'worlddb/models' ## also add to xxxx ??? ## (possible to include as globals ???? how - Object.send :include ???) or ## Module.send :include ?? ## find a better check - check for constants defined??? if not define??? ## or use constant_missing handler??? if res == false puts " todo/fix: WorldDb::Models already included ??" end puts "include WorldDb::Models" ### check/fix: include as globals/top-level!!! how? possible??? Builder.send :include, WorldDb::Models PageCtx.send :include, WorldDb::Models HybookHelper.send :include, WorldDb::Models ## constants not accesible (include in module too) ## BookCtx.send :include, WorldDb::Models -- needed for Book context too?? why, why not?? end