Sha256: 8f470cd94de47f21426db147564155d69a5c6263ede7051ff0300781d75e79a0
Contents?: true
Size: 580 Bytes
Versions: 73
Compression:
Stored size: 580 Bytes
Contents
module Recog class DBManager require 'nokogiri' require 'recog/db' attr_accessor :path, :databases DefaultDatabasePath = File.expand_path( File.join( File.dirname(__FILE__), "..", "..", "xml") ) def initialize(path = DefaultDatabasePath) self.path = path reload end def load_databases if File.directory?(self.path) Dir[self.path + "/*.xml"].each do |dbxml| self.databases << DB.new(dbxml) end else self.databases << DB.new(self.path) end end def reload self.databases = [] load_databases end end end
Version data entries
73 entries across 73 versions & 1 rubygems