# encoding: utf-8 module LocalPac class LocalStorage private attr_reader :storage public def initialize(storage = GitStorage.new(LocalPac.config.local_storage)) @storage = storage end def find(name) name = name.sub(/.pac$/, '').gsub(%r{/}, '::').downcase.to_sym LocalPac.ui_logger.debug "Using the following name to find pac file: \":#{name}\"." file = storage[name] LocalPac.ui_logger.debug "Returning the following file: \"#{file.path || 'not found' }\"." file end end end