Method: Rdm::Packages::Locator.locate

Defined in:
lib/rdm/packages/locator.rb

.locate(path) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/rdm/packages/locator.rb', line 3

def locate(path)
  raise Rdm::Errors::PackageFileDoesNotFound, path if source_present?(path)
  raise Rdm::Errors::SourceFileDoesNotExist,  path if root_reached?(path)
  
  return path if package_present?(path)
  
  locate(File.dirname(path))
end