Last active
January 21, 2019 12:35
-
-
Save SebastianHGonzalez/7ed1b2c0c4a548f75d72e4d59f9aae3e to your computer and use it in GitHub Desktop.
point cut's before and after methods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| before(context, joinPointName, ...args) { | |
| this.aspects.reduce( | |
| (_, aspect) => aspect.before(context, joinPointName, ...args) | |
| ); | |
| } | |
| after(context, joinPointName, result, ...args) { | |
| return this.aspects.reduce( | |
| (prevResult, aspect) => aspect.after(context, joinPointName, prevResult, ...args), | |
| result | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment