Last active
January 8, 2018 19:48
-
-
Save sliskiCode/56ba32a32b39568c01543fe8bee73454 to your computer and use it in GitHub Desktop.
6 magic sugars that can make your Kotlin codebase happier #30
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
fun toolbar(block: Toolbar.() -> Unit): Toolbar = Toolbar.apply(block) | |
object Toolbar { | |
fun openSearch(block: SearchToolbar.() -> Unit): SearchToolbar { | |
// Testing framework code | |
return SearchToolbar.apply(block) | |
} | |
} | |
object SearchToolbar { | |
fun type(text: String) { | |
// Testing framework code | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment