Last active
January 2, 2019 18:51
-
-
Save SebastianHGonzalez/78dc1a1664a01f89fb2af2ba04f27b6a to your computer and use it in GitHub Desktop.
This file contains 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
class LoggerAspect { | |
constructor(logger) { | |
this.logger = logger; | |
} | |
before(context, joinPointName, ...args) { | |
this.logger.log("logging"); | |
} | |
} | |
class TimeAspect { | |
constructor(timer, logger) { | |
this.timer = timer; | |
this.logger = logger; | |
} | |
before() { | |
this.timer.start(); | |
} | |
after() { | |
this.timer.stop(); | |
this.logger.log(this.timer.getTime()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment