Github user bsideup commented on a diff in the pull request: https://github.com/apache/incubator-groovy/pull/4#discussion_r28948071 --- Diff: src/main/groovy/util/Event.groovy --- @@ -0,0 +1,21 @@ +package groovy.util + +import groovy.transform.InheritConstructors; + +@InheritConstructors +public class Event extends Closure +{ + private List<Closure> subscribers = [] + + public Event plus(Closure closure) + { + this.subscribers.add(closure) + return this + } + + @Override + Object call(Object... args) + { + subscribers.each{ it.call(args) } --- End diff -- can be replaced with: `subscribers*.call(args)`
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---