Skip to content

Instantly share code, notes, and snippets.

@erica erica/print.swift
Created Jun 11, 2015

Embed
What would you like to do?
extension Features : CustomStringConvertible {
var description : String {
let strings = ["Alarm System", "CD Stereo",
"Chrome Wheels", "Pin Stripes", "Leather Interior",
"Undercoating", "Window Tint"]
var members = [String]()
for (flag, string) in strings.enumerate() where contains(Features(rawValue:1<<(flag + 1))) {
members.append(string)
}
return members.description
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.