summaryrefslogtreecommitdiffstats
path: root/lib/facter.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-05-16 10:38:15 -0500
committerLuke Kanies <luke@madstop.com>2008-05-16 10:38:15 -0500
commitbb41db0bf4221e394411d2a82b6de264b557fb95 (patch)
treefbc8773d5e6b5a708db24e3943ca3b3fb7f98880 /lib/facter.rb
parent07a3d479b0e31aa7a1f8e6d0e178e440adc57030 (diff)
downloadfacter-bb41db0bf4221e394411d2a82b6de264b557fb95.tar.gz
facter-bb41db0bf4221e394411d2a82b6de264b557fb95.tar.xz
facter-bb41db0bf4221e394411d2a82b6de264b557fb95.zip
Switching to a search path registration system.
Facter no longer knows anything about Puppet, so there's no inter-dependency issue.
Diffstat (limited to 'lib/facter.rb')
-rw-r--r--lib/facter.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/facter.rb b/lib/facter.rb
index aae3326..525dbcd 100644
--- a/lib/facter.rb
+++ b/lib/facter.rb
@@ -179,4 +179,16 @@ module Facter
def self.loadfacts
collection.load_all
end
+
+ @search_path = []
+
+ # Register a directory to search through.
+ def self.search(*dirs)
+ @search_path += dirs
+ end
+
+ # Return our registered search directories.
+ def self.search_path
+ @search_path.dup
+ end
end