Class: DotMe::Loader

Inherits:
Object
  • Object
show all
Defined in:
lib/dotme/loader.rb

Class Method Summary collapse

Class Method Details

.load!Object



3
4
5
6
7
8
9
10
11
# File 'lib/dotme/loader.rb', line 3

def self.load!
  Dir[ ::File.join ::File.dirname(__FILE__), 'incubators/*.rb' ].each do |file|
    begin
      require file
      clazz = DotMe.const_get file.gsub( /^.*incubators\/(.+)\.rb$/, '\1' ).capitalize
      DotMe::Incubator.register! clazz 
    rescue; end
  end
end