Class: R10K::Deployment::Config::Loader Private

Inherits:
Object
  • Object
show all
Defined in:
lib/r10k/deployment/config/loader.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

#initializeLoader

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

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

#searchString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns The path to the first valid configfile.

Returns:

  • (String)

    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