Method: Mongoose::Database#initialize
- Defined in:
- lib/mongoose/database.rb
#initialize(params = {}) ⇒ Database
initialize
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/mongoose/database.rb', line 12 def initialize(params={}) @path = params[:path] || './' Table.db = self @tables = {} Dir.foreach(@path) do |filename| next unless File.extname(filename) == TBL_HDR_EXT table_name = File.basename(filename, ".*").to_sym init_table(table_name) end end |