class Bookfile::BeerDef
Public Class Methods
new( db_config )
click to toggle source
Calls superclass method
Bookfile::Database::new
# File lib/bookfile/database/database.rb, line 57 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 61 def prepare ## change to require - why, why not?? puts "setup beer: #{@db_config.inspect}" res = require 'beerdb/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: BeerDb::Models already included ??" end ## for now always include puts " include BeerDb::Models" ### check/fix: include as globals/top-level!!! how? possible??? Builder.send :include, BeerDb::Models PageCtx.send :include, BeerDb::Models HybookHelper.send :include, BeerDb::Models ## constants not accesible (include in module too) end