Module: BuildpackSupport::DirectoryFinder
- Included in:
- BuildpackVersion, Cache::DownloadCache, Component::BaseDroplet, ConfigurationUtils
- Defined in:
- lib/buildpack_support/directory_finder.rb
Overview
A module encapsulating all of the code for the directory finding utilities
Instance Method Summary collapse
-
#load_path_peer(name) ⇒ Pathname
Finds a directory that is a peer of the $LOAD_PATH.
Instance Method Details
#load_path_peer(name) ⇒ Pathname
Finds a directory that is a peer of the $LOAD_PATH
28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/buildpack_support/directory_finder.rb', line 28 def load_path_peer(name) directory = Pathname.new('.nil') $LOAD_PATH.each do |path| candidate = Pathname.new(path) + '..' + name next unless candidate.exist? directory = candidate break end directory end |