module Librarian::Source::Local
Requires that the including source class have methods:
#path #environment
Public Instance Methods
found_path(name)
click to toggle source
# File lib/librarian/source/local.rb, line 28 def found_path(name) @_found_paths ||= { } @_found_paths[name] ||= begin paths = manifest_search_paths(name) paths.find{|p| manifest?(name, p)} end end
manifest_search_paths(name)
click to toggle source
# File lib/librarian/source/local.rb, line 19 def manifest_search_paths(name) @manifest_search_paths ||= { } @manifest_search_paths[name] ||= begin cache! paths = [filesystem_path, filesystem_path.join(name)] paths.select{|s| s.exist?} end end
manifests(name)
click to toggle source
# File lib/librarian/source/local.rb, line 14 def manifests(name) manifest = Manifest.new(self, name) [manifest].compact end
Private Instance Methods
debug(*args, &block)
click to toggle source
# File lib/librarian/source/local.rb, line 44 def debug(*args, &block) environment.logger.debug(*args, &block) end
info(*args, &block)
click to toggle source
# File lib/librarian/source/local.rb, line 40 def info(*args, &block) environment.logger.info(*args, &block) end
relative_path_to(path)
click to toggle source
# File lib/librarian/source/local.rb, line 48 def relative_path_to(path) environment.logger.relative_path_to(path) end