Class: Nanoc::Int::Checksummer::CompactDigest Private
- Inherits:
-
Object
- Object
- Nanoc::Int::Checksummer::CompactDigest
- Defined in:
- lib/nanoc/base/checksummer.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#initialize ⇒ CompactDigest
constructor
private
A new instance of CompactDigest.
- #to_s ⇒ Object private
- #update(str) ⇒ Object private
Constructor Details
#initialize ⇒ CompactDigest
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of CompactDigest.
24 25 26 |
# File 'lib/nanoc/base/checksummer.rb', line 24 def initialize @digest = Digest::SHA1.new end |
Instance Method Details
#to_s ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 |
# File 'lib/nanoc/base/checksummer.rb', line 32 def to_s @digest.base64digest end |
#update(str) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
28 29 30 |
# File 'lib/nanoc/base/checksummer.rb', line 28 def update(str) @digest.update(str) end |