class Covered::Persist

def apply(record, ignore_mtime: false)

@returns [Boolean] Whether the record was applied.
@parameter ignore_mtime [Boolean] Whether to apply records even if their source appears stale.
@parameter record [Hash] The persisted coverage record.
Records with stale source modification times are ignored unless `ignore_mtime` is true.
Apply a persisted record to the output.
def apply(record, ignore_mtime: false)
	if coverage = record[:coverage]
		if path = record[:path]
			path = self.expand_path(path)
			coverage.path = path
		end
		
		if ignore_mtime || coverage.fresh?
			add(coverage)
			return true
		end
	end
	
	return false
end