Skip to content

Instantly share code, notes, and snippets.

@eofster
Created December 8, 2015 13:57
Show Gist options
  • Save eofster/388a08de51c31a7ac8c9 to your computer and use it in GitHub Desktop.
Save eofster/388a08de51c31a7ac8c9 to your computer and use it in GitHub Desktop.
Use case for presenting GPS track summary
protocol TrackSummaryInteractorOutput {
func update(track: TrackSummary)
}
class TrackSummaryInteractor {
let output: TrackSummaryInteractorOutput
init(output: TrackSummaryInteractorOutput) {
self.output = output
}
func execute() {
//
// Implement business logic for getting track details.
//
output.update(TrackSummary(name: "Track", startTime: 1234567890, distance: 100))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment