module Rickshaw::Helper

Public Class Methods

hash_file(hash, file_path) click to toggle source
# 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