// Populate a list with the instances def items = [new Item(name : 'Magical sword', value : 1000), new Item(name : 'Cloak of invisibility', value : 500), new Item(name : 'Amulet of protection', value : 700)] // now display each items.each { item -> println item // automatically calls toString }