Last active
August 29, 2015 14:04
-
-
Save heymichaelp/4bde0e0442041942db0e to your computer and use it in GitHub Desktop.
Decorators: Example
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
var generateReportCardService = new GenerateReportCard() | |
var decoratedService = new EmailReportCardToParent(generateReportCardService) | |
// returned object is exact same object | |
decoratedService === generateReportCardService // true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
isn't there a typo?
generateReportCard
shouldn't begenerateReportCardService
?