あーこういうことできるんだという記録
class Person { String name int age } def p = new Person() [[name:'my name'], [age:30]]*.each{p[it.key] = it.value} assert p.name == 'my name' assert p.age == 30
あーこういうことできるんだという記録
class Person { String name int age } def p = new Person() [[name:'my name'], [age:30]]*.each{p[it.key] = it.value} assert p.name == 'my name' assert p.age == 30