Slide 15
Slide 15 text
protocol RequestProtocol {
var dict: [String: String] { get }
}
extension CommonRequestProtocol {
var dict: [String: String] {
// ͍࣋ͬͯΔશมΛྻʹͯ͠ฦ͢ॲཧ
}
}
protocol CommonRequestProtocol: RequestProtocol {
var dict: [String: String] { get }
}
extension CommonRequestProtocol {
var dict: [String: String] {
// RequestProtocolͷdictʹΞΫηε͔͕ͨͬͨ͠ɺɺɺ
return self.dict.merging(["key": Const.Key], uniquingKeysWith: +)
}
}
15
EJDUͷதͰEJDUʹΞΫηεͯ͠ແݶϧʔϓʹʜ