Skip to content

Instantly share code, notes, and snippets.

@ayanonagon
Created November 8, 2015 03:00
Show Gist options
  • Save ayanonagon/82c2911bd32b2c9e5aaf to your computer and use it in GitHub Desktop.
Save ayanonagon/82c2911bd32b2c9e5aaf to your computer and use it in GitHub Desktop.
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