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