Module: Rickshaw::SHA1
- Defined in:
- lib/rickshaw.rb
Class Method Summary collapse
Class Method Details
.hash(file_path) ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rickshaw.rb', line 25 def self.hash(file_path) hash = Digest::SHA1.new open(file_path, 'r') do |io| until io.eof? buffer = io.read(1024) hash.update(buffer) end end hash.hexdigest end |