Class: R10K::Deployment::Config::Loader
- Inherits:
-
Object
- Object
- R10K::Deployment::Config::Loader
- Defined in:
- lib/r10k/deployment/config/loader.rb
Instance Method Summary collapse
-
#initialize ⇒ Loader
constructor
Search for a deployment configuration file (r10k.yaml) in all parent directories and in /etc/r10k.yaml.
-
#search ⇒ String
The path to the first valid configfile.
Constructor Details
#initialize ⇒ Loader
Search for a deployment configuration file (r10k.yaml) in all parent directories and in /etc/r10k.yaml
9 10 11 12 13 |
# File 'lib/r10k/deployment/config/loader.rb', line 9 def initialize @loadpath = [] populate_loadpath end |
Instance Method Details
#search ⇒ String
Returns The path to the first valid configfile.
16 17 18 |
# File 'lib/r10k/deployment/config/loader.rb', line 16 def search first = @loadpath.find {|filename| File.file? filename} end |