Created
July 6, 2023 14:04
-
-
Save ArunYogeshwaran/76a437c98be70889ea8e5cd73c29ebf8 to your computer and use it in GitHub Desktop.
The example below shows a class that contains the logic of a feature in an app where a user can invite another user based on certain internal conditions.
This file contains 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
fun referFriend(userId: String, referral: Referral) { | |
if (isReferralValid(referral)) { | |
processReferral(userId) | |
} | |
} | |
private fun isReferralValid(referral: Referral): Boolean { | |
// Checks the validity of the referral. | |
} | |
private fun processReferral(userId: String) { | |
// Processes the referral. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment