Module: Chem::Db

Defined in:
lib/chem/db.rb

Class Method Summary collapse

Class Method Details

.loadObject

Load type files User would not call this method



14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/chem/db.rb', line 14

def load # :nodoc
  $LOAD_PATH.each do |path|
    dir = File.join(path, 'chem/db/types')
    next unless File.directory?(dir)
    Dir.entries(dir).each do |entry|
      if File.extname(entry) == ".rb" and not /^_/.match(entry)
        begin
          require(File.join(dir, entry))
        rescue LoadError => e
        end
      end
    end
  end
end