Groovy web console

subscribe to the feed Subscribe
to this
site

groovy optional call

Published 1 month ago by agate
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
def demo(opts=[:], body) {
  def tag = opts["tag"] ?: "default"
  println("tag: " + tag)
  body.call()
}

demo {
  println("from body")
}

demo(tag: "v1") {
  println("from body")
}