Skip to content

Instantly share code, notes, and snippets.

@blessingLopes
Created April 20, 2016 02:05
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blessingLopes/e4318fa9958a8e1d9d48d9266832ab25 to your computer and use it in GitHub Desktop.
Save blessingLopes/e4318fa9958a8e1d9d48d9266832ab25 to your computer and use it in GitHub Desktop.
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