Skip to content

Instantly share code, notes, and snippets.

@shawnthye
Forked from HopefulLlama/properties.groovy
Created March 14, 2019 11:52
Show Gist options
  • Save shawnthye/500647ac1def94062ef9e789807bd4f3 to your computer and use it in GitHub Desktop.
Save shawnthye/500647ac1def94062ef9e789807bd4f3 to your computer and use it in GitHub Desktop.
Print all properties of a Groovy object
println object.properties
.sort{it.key}
.collect{it}
.findAll{!['class', 'active'].contains(it.key)}
.join('\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment