Last active
May 13, 2024 22:17
-
-
Save birojow/2e76ed47e9519225a8eb58cf18b0ab3f to your computer and use it in GitHub Desktop.
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
class UserDsl { | |
... | |
private val contactInfoDsl = UserContactInfoDsl() | |
private val rolesDsl = UserRolesDsl() | |
... | |
fun build(): User { | |
return User( | |
name = name, | |
contactInfo = ContactInfo( | |
email = contactInfoDsl.email, | |
phoneNumber = contactInfoDsl.phoneNumber | |
), | |
roles = rolesDsl.roles | |
) | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment