Class: Nanoc::Core::Checksummer::CompactDigest
- Inherits:
-
Object
- Object
- Nanoc::Core::Checksummer::CompactDigest
- Defined in:
- lib/nanoc/core/checksummer.rb
Instance Method Summary collapse
-
#initialize ⇒ CompactDigest
constructor
A new instance of CompactDigest.
- #to_s ⇒ Object
- #update(str) ⇒ Object
Constructor Details
#initialize ⇒ CompactDigest
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_s ⇒ Object
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 |