Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public protocol Selfie: CustomStringConvertible {}
extension Selfie {
var description: String {
let mirror = Mirror(reflecting: self)
return "\(mirror.subjectType)( \(mirror.children.map({ "\($0!): \($1) "}).joinWithSeparator(", ")))"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment