Creating ConfigSlurper files

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Creating ConfigSlurper files

Andrew.P.Jewell
Hi. . . sorry if this is a dumb question but after much searching it eventually became a matter of curiosity.

Is it possible to use the ConfigSlurper object itself to create config files? I was thinking something like this:

def cs = new ConfigSlurper()

cs['prop1'] = "value1"
cs['prop2'] = ['v1','v2']

None of the examples I've found refer to this method so I assume it's not the way it's supposed to work.

Is there a builder or I guess, what's the preferred approach to writing these slurper files programmatically?

Thank you!

Andy
Loading...