Skip to content

Instantly share code, notes, and snippets.

@vialyx
Created October 15, 2018 03:32
Show Gist options
  • Save vialyx/23501f6aba65469e5b1d2ee288054ee9 to your computer and use it in GitHub Desktop.
Save vialyx/23501f6aba65469e5b1d2ee288054ee9 to your computer and use it in GitHub Desktop.
extension CreditCard {
func info() -> [String: String] {
return ["number": number,
"date": date,
"name": name,
"ccv": ccv]
}
}
let newCard = CreditCard(number: "4111 0000 0000 0000", date: "03/05", ccv: "098")
print("card info: \(newCard.info())")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment