Class: Facter::Util::Loader
- Inherits:
-
Object
- Object
- Facter::Util::Loader
- Defined in:
- lib/core/mod/facter_loader.rb
Instance Method Summary collapse
Instance Method Details
#load_dir(dir) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/core/mod/facter_loader.rb', line 5 def load_dir(dir) # TODO: If this works submit a patch to Facter project return if dir =~ /\/\.+$/ or dir =~ /\/util$/ or dir =~ /\/core$/ or dir =~ /\/lib$/ Dir.entries(dir).find_all { |f| f =~ /\.rb$/ }.sort.each do |file| load_file(File.join(dir, file)) end end |