lib/nanoc/base/compilation/outdatedness_checker.rb in nanoc-4.1.1 vs lib/nanoc/base/compilation/outdatedness_checker.rb in nanoc-4.1.2
- old
+ new
@@ -170,24 +170,32 @@
def rule_memory_differs_for(obj)
!rule_memory_store[obj].eql?(@action_provider.memory_for(obj).serialize)
end
memoize :rule_memory_differs_for
+ # @param obj The object to create a checksum for
+ #
+ # @return [String] The digest
+ def calc_checksum(obj)
+ Nanoc::Int::Checksummer.calc(obj)
+ end
+ memoize :calc_checksum
+
# @param obj
#
# @return [Boolean] false if either the new or the old checksum for the
# given object is not available, true if both checksums are available
def checksums_available?(obj)
- checksum_store[obj] && Nanoc::Int::Checksummer.calc(obj)
+ checksum_store[obj] && calc_checksum(obj)
end
memoize :checksums_available?
# @param obj
#
# @return [Boolean] false if the old and new checksums for the given
# object differ, true if they are identical
def checksums_identical?(obj)
- checksum_store[obj] == Nanoc::Int::Checksummer.calc(obj)
+ checksum_store[obj] == calc_checksum(obj)
end
memoize :checksums_identical?
# @param obj
#