Skip to content

Instantly share code, notes, and snippets.

@cmvandrevala
Last active March 11, 2017 22:24
Show Gist options
  • Save cmvandrevala/f4ac1fec05133005078186776283a230 to your computer and use it in GitHub Desktop.
Save cmvandrevala/f4ac1fec05133005078186776283a230 to your computer and use it in GitHub Desktop.
class Logger {
func logToConsole() {
print("This is a log to some console.")
}
func logToFile() {
print("This represents a log to a file.")
}
}
class FakeServer {
var logger = Logger()
func run() {
someImportantAction()
logger.logToConsole()
logger.logToFile()
}
private func someImportantAction() -> Void {
print("This is some important action!")
}
}
var server = FakeServer()
server.run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment