lib/nanoc/base/compilation/rules_collection.rb in nanoc-4.0.0b3 vs lib/nanoc/base/compilation/rules_collection.rb in nanoc-4.0.0b4

- old
+ new

@@ -168,28 +168,22 @@ # @return [Object] An unique reference to this object def reference :rules end - # @return [String] The checksum for this object. If its contents change, - # the checksum will change as well. - def __nanoc_checksum - Nanoc::Int::Checksummer.calc(self) - end - def inspect "<#{self.class}>" end # @param [Nanoc::Int::ItemRep] rep The item representation to get the rule # memory for # # @return [Array] The rule memory for the given item representation def new_rule_memory_for_rep(rep) - recording_proxy = rep.to_recording_proxy - compilation_rule_for(rep).apply_to(recording_proxy, compiler: @compiler) - recording_proxy.rule_memory << [:write, rep.path] - make_rule_memory_serializable(recording_proxy.rule_memory) + executor = Nanoc::Int::RecordingExecutor.new + compilation_rule_for(rep).apply_to(rep, executor: executor, compiler: @compiler) + executor.record_write(rep, rep.path) + make_rule_memory_serializable(executor.rule_memory) end memoize :new_rule_memory_for_rep # Makes the given rule memory serializable by calling # `Nanoc::Int::Checksummer#calc` on the filter arguments, so that objects such as