Module: ArtifactTools::Hasher

Included in:
Client, ConfigFile, Uploader
Defined in:
lib/artifact_tools/hasher.rb

Overview

wrapper for the hashing algo used

Instance Method Summary collapse

Instance Method Details

#file_hash(path) ⇒ Object

Calculate hash of a file

Parameters:

  • path (String)

    Path to file to hash.



9
10
11
# File 'lib/artifact_tools/hasher.rb', line 9

def file_hash(path)
  hash_algo.file(path).hexdigest
end