class MaterialSyncSuppressionMatcher def self.match source_kind:, source_uri: nil, drive_path: nil, drive_file_id: nil, source_path: nil, source_file_id: nil key = MaterialSyncSuppression.normalize_source_key(source_kind:, source_uri:, drive_path:, drive_file_id:, source_path:, source_file_id:) return nil if key.blank? MaterialSyncSuppression.find_by(normalized_source_key: key) end def self.suppressed?(...) match(...).present? end end