Reputation: 57
So I have a method that has a few variables in its signautre like this public PageLinksVM mapLinks(URI requestUrl, Integer offset, Integer limit, Integer total)
If it had no variables on the input I would do the following
def:
object.mapLinks()>> returnedObject
How do I do this when the method has inputs and i Want to return no matter what is passed to the method?
Upvotes: 1
Views: 765
Reputation: 5129
You can use *_
to allow any number of any input arguments.
def:
object.mapLinks(*_)>> returnedObject
Here is the Spock documentation on argument contraints.
Upvotes: 1