final class IgnoreCommand: JSONCommand {
- private static let ignores: [String] = {
+ private static let ignores: Set<String> = {
guard let url = Bundle.main.url(forResource: "IgnoreCommand", withExtension: "plist"),
let array = NSArray(contentsOf: url) as? [String] else {
fatalError("Can not read IgnoreCommand.plist")
}
- return array
+ return Set(array)
}()
override class func canExecuteAPI(_ api: API) -> Bool {
- if api.includs(in: ignores) { return true }
- if api.isRanking() { return true }
+ if api.includs(in: ignores) {
+
+ return true
+ }
+ if api.isRanking() {
+
+ return true
+ }
return false
}