class Coverband::Utils::FileHasher

Public Class Methods

hash(file, path_converter: AbsoluteFileConverter.instance) click to toggle source
# File lib/coverband/utils/file_hasher.rb, line 8
def self.hash(file, path_converter: AbsoluteFileConverter.instance)
  @cache[file] ||= begin
                     file = path_converter.convert(file)
                     Digest::MD5.file(file).hexdigest if File.exist?(file)
                   end
end