ファイル
btrc-hub/backend/app/services/material_sync_suppression_matcher.rb
T
2026-06-25 17:40:34 +09:00

23 行
825 B
Ruby

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