cheat sheet groovy

This commit is contained in:
Morgan 2018-03-13 19:17:13 +01:00 committed by GitHub
parent 792682ae7b
commit 16a5982451
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

7
cheat/groovy.md Normal file
View File

@ -0,0 +1,7 @@
# List class methods
`<class>.metaClass.methods*.name.sort().unique()`
## Example
`println new Person().metaClass.methods*.name.sort().unique()`
Source http://groovy-almanac.org/list-the-methods-of-a-groovy-class/