Is thi开发者_如何学运维s possible and if, how?
item.foo = "moo"
def x = "foo"
item.[x] = "moo"
I'm not sure I get your question, but...
def item = {
def foo
}
def x = "foo"
item[x] = "moo"
assert item[x] == "moo"
assert item.foo == "moo"
Is thi开发者_如何学运维s possible and if, how?
item.foo = "moo"
def x = "foo"
item.[x] = "moo"
I'm not sure I get your question, but...
def item = {
def foo
}
def x = "foo"
item[x] = "moo"
assert item[x] == "moo"
assert item.foo == "moo"
精彩评论