Module: Rickshaw::Helper

Defined in:
lib/rickshaw.rb

Class Method Summary collapse

Class Method Details

.hash_file(hash, file_path) ⇒ Object



42
43
44
45
46
47
48
49
50
51
# File 'lib/rickshaw.rb', line 42

def self.hash_file(hash, file_path)
  open(file_path, 'r') do |io|
    until io.eof?
      buffer = io.read(1024)
      hash.update(buffer)
    end
  end

  hash.hexdigest
end