Class: Nanoc::Int::ChecksumCollection
- Inherits:
-
Object
- Object
- Nanoc::Int::ChecksumCollection
- Defined in:
- lib/nanoc/base/entities/checksum_collection.rb
Instance Method Summary collapse
-
#attributes_checksum_for(obj) ⇒ Object
-
#checksum_for(obj) ⇒ Object
-
#content_checksum_for(obj) ⇒ Object
-
#initialize(checksums) ⇒ ChecksumCollection
constructor
A new instance of ChecksumCollection.
-
#to_h ⇒ Object
Constructor Details
#initialize(checksums) ⇒ ChecksumCollection
Returns a new instance of ChecksumCollection
10 11 12 |
# File 'lib/nanoc/base/entities/checksum_collection.rb', line 10 def initialize(checksums) @checksums = checksums end |
Instance Method Details
#attributes_checksum_for(obj) ⇒ Object
25 26 27 |
# File 'lib/nanoc/base/entities/checksum_collection.rb', line 25 def attributes_checksum_for(obj) @checksums[[obj.reference, :each_attribute]] end |
#checksum_for(obj) ⇒ Object
15 16 17 |
# File 'lib/nanoc/base/entities/checksum_collection.rb', line 15 def checksum_for(obj) @checksums[obj.reference] end |
#content_checksum_for(obj) ⇒ Object
20 21 22 |
# File 'lib/nanoc/base/entities/checksum_collection.rb', line 20 def content_checksum_for(obj) @checksums[[obj.reference, :content]] end |
#to_h ⇒ Object
29 30 31 |
# File 'lib/nanoc/base/entities/checksum_collection.rb', line 29 def to_h @checksums end |