- import Foundation
- extension CustomStringConvertible {
- var description : String {
- var description: String = ""
-
- let selfMirror = Mirror(reflecting: self)
- for child in selfMirror.children {
- if let propertyName = child.label {
- description += "\(propertyName): \(child.value)\n"
- }
- }
- return description
- }
- }
|