OSDN Git Service

integerArrayプロパティを追加
authormasakih <masakih@users.sourceforge.jp>
Mon, 11 Dec 2017 15:28:38 +0000 (00:28 +0900)
committermasakih <masakih@users.sourceforge.jp>
Mon, 11 Dec 2017 15:28:38 +0000 (00:28 +0900)
KCD/APIResponse.swift

index 4180163..a10cb9a 100644 (file)
@@ -97,6 +97,9 @@ struct ParameterValue {
         
         return rawValue?.components(separatedBy: ",").map { ParameterValue($0) } ?? []
     }
+    var integerArray: [Int] {
+        return array.flatMap { $0.int }
+    }
     
     var valid: Bool { return rawValue != nil }