Module: Digest::Instance
- Defined in:
- lib/extensions/digest/digest.rb
Instance Method Summary collapse
-
#file(name) ⇒ Object
updates the digest with the contents of a given file name and returns self.
Instance Method Details
#file(name) ⇒ Object
updates the digest with the contents of a given file name and returns self.
36 37 38 39 40 41 42 43 44 |
# File 'lib/extensions/digest/digest.rb', line 36 def file(name) File.open(name, "rb") {|f| buf = "" while f.read(16384, buf) update buf end } self end |