Class: Nanoc::Core::Checksummer::PathnameUpdateBehavior
- Inherits:
-
UpdateBehavior
- Object
- UpdateBehavior
- Nanoc::Core::Checksummer::PathnameUpdateBehavior
- Defined in:
- lib/nanoc/core/checksummer.rb
Class Method Summary collapse
Class Method Details
.update(obj, digest) ⇒ Object
265 266 267 268 269 270 271 272 273 |
# File 'lib/nanoc/core/checksummer.rb', line 265 def self.update(obj, digest) filename = obj.to_s if File.exist?(filename) stat = File.stat(filename) digest.update(stat.size.to_s + '-' + stat.mtime.to_i.to_s) else digest.update('???') end end |