Created
November 26, 2015 07:15
-
-
Save kdabir/a27a609b26c076d75fcb to your computer and use it in GitHub Desktop.
using call on groovy object.
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
def now = new A() | |
class A{ | |
def getCurrentDate() {new Date().format("yyyy-MM-dd HH:mm:ss")} | |
def call(){ getCurrentDate() } | |
} | |
now() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment