Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Able to use single-arg closure for methods that accept Expression #10

Open
yihtserns opened this issue Apr 17, 2015 · 1 comment
Open
Milestone

Comments

@yihtserns
Copy link
Owner

Right now, have to do this:

from(...).transform { exchange, type -> ... }.setBody { exchange, type -> ... }

Most of the time, I don't care about the type argument, I want to do something similar to this:

from(...).transform { ... }.setBody { ... }

where the implicit it is just exchange.

@yihtserns yihtserns added this to the 0.0.2 milestone Apr 17, 2015
@yihtserns
Copy link
Owner Author

There are too many methods that uses Expression, and I don't think there's a way to add this support to all of them with small effort.

Perhaps by adding groovy(Closure) method in ExpressionClause?

from(...).transform().groovy { ... }.setBody().groovy { ... }

@yihtserns yihtserns removed this from the 0.0.2 milestone Apr 21, 2015
@yihtserns yihtserns added this to the 0.0.3 milestone Sep 26, 2015
@yihtserns yihtserns assigned yihtserns and unassigned yihtserns Sep 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant