Class: R10K::Config::Loader
- Inherits:
-
Object
- Object
- R10K::Config::Loader
- Defined in:
- lib/r10k/config/loader.rb
Instance Method Summary collapse
-
#initialize ⇒ Loader
constructor
A new instance of Loader.
-
#search ⇒ String
The path to the first valid configfile.
Constructor Details
#initialize ⇒ Loader
Returns a new instance of Loader.
8 9 10 11 12 |
# File 'lib/r10k/config/loader.rb', line 8 def initialize @loadpath = [] populate_loadpath end |
Instance Method Details
#search ⇒ String
Returns The path to the first valid configfile.
15 16 17 |
# File 'lib/r10k/config/loader.rb', line 15 def search first = @loadpath.find {|filename| File.file? filename} end |