Created
July 6, 2020 12:07
-
-
Save Kdan/019b3113cccd161ff50890d424b87753 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
| class A { | |
| /// The instance of B we are using to check if we have the answer. | |
| var b: B? | |
| /// A `Bool` indicating if we have the answer to the universe. | |
| private(set) var hasAnswer = false | |
| /// Checks if we have the answer to the universe and updates the `hasAnswer` property. | |
| func checkAnswer() { | |
| hasAnswer = b?.validateAnswer() ?? false | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment