Slide 45
Slide 45 text
classܧঝͯ͠ΔͷʹɺsuperݺΜͰͳ͍ʁ
open class Cat: Animal {
public var declawed: Bool?
// Decodable protocol methods
public override required init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: String.self)
declawed = try container.decodeIfPresent(Bool.self, forKey: "declawed")
}
}
superݺΜͰͳ͍