Created
February 21, 2020 04:47
-
-
Save charlesmuchene/ae5db33bb76c8bb4bb00660abd5bf3a0 to your computer and use it in GitHub Desktop.
Single method invocable usecase
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
| interface UseCase { | |
| operator fun invoke() | |
| } | |
| class UseCaseImpl: UseCase { | |
| override fun invoke() { | |
| println("Invalidate cache") | |
| } | |
| } | |
| val usecase: UseCase = UseCaseImpl() | |
| usecase() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment