Created
March 29, 2016 13:20
-
-
Save int128/2840142fbf884b678dfc to your computer and use it in GitHub Desktop.
Using closure of Groovy2 on Groovy1
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
class ClosureBridge { | |
static Closure wrap(closureOnAnotherWorld) { | |
{ -> | |
closureOnAnotherWorld.delegate = delegate | |
closureOnAnotherWorld.resolveStrategy = resolveStrategy | |
closureOnAnotherWorld.call() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment