Named parameters in groovy


def someMethod(args) {
    assert args.firstname == "Jon"
    assert args.lastname == "Doe"
    assert args.age == 32
    assert args.size() == 3
}
someMethod(firstname:"Jon", lastname:"Doe", age:32)