core (2) [Avatar] Offline
#1
Can I create a NodeBuilder node where the node name is variable?

Say I want to create nodes like: node1, node2, node3.

I can't do this directly...

builder= new NodeBuilder()
builder.a() {
b()
(1..3).each{
def nodeName= 'c'+ it
println "nodeName= ${nodeName}"
nodeName () // !!! want the node name here
}
}

Realized this is not specific to the book so I should post it somewhere else.

Message was edited by:
core