Last active
June 19, 2017 22:11
-
-
Save efremidze/1ca66702c7662b549075a0401898c49e to your computer and use it in GitHub Desktop.
Struct Convenience Initializer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Comment { | |
let text: String | |
let date: Date | |
static func make(_ text: String) -> Comment { | |
return Comment(text: text, date: Date()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment