Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
fun UglyTask.printAssignment() {
when {
assignedGroup == null && assignedUser == null -> println("\"$name\" is assigned to no one")
assignedGroup != null -> println("\"$name\" is assigned to to group: ${assignedGroup.name}")
assignedUser != null -> println("\"$name\" is assigned to to user: ${assignedUser.name}")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment