Class: Nanoc::Core::Checksummer::CompactDigest

Inherits:
Object
  • Object
show all
Defined in:
lib/nanoc/core/checksummer.rb

Instance Method Summary collapse

Constructor Details

#initializeCompactDigest

Returns a new instance of CompactDigest.



25
26
27
# File 'lib/nanoc/core/checksummer.rb', line 25

def initialize
  @digest = Digest::SHA1.new
end

Instance Method Details

#to_sObject



33
34
35
# File 'lib/nanoc/core/checksummer.rb', line 33

def to_s
  @digest.base64digest
end

#update(str) ⇒ Object



29
30
31
# File 'lib/nanoc/core/checksummer.rb', line 29

def update(str)
  @digest.update(str)
end