Created
November 8, 2015 03:00
-
-
Save ayanonagon/82c2911bd32b2c9e5aaf to your computer and use it in GitHub Desktop.
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
protocol Streamable { | |
var title: String { get } | |
var body: String { get } | |
} | |
extension Streamable { | |
var writableString: String { | |
return "# \(title)\n\n\(body)" | |
} | |
} | |
struct License: Streamable { | |
let libraryName: String | |
let legalText: String | |
var title: String { | |
return libraryName | |
} | |
var body: String { | |
return legalText | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment