Created
April 21, 2019 17:41
-
-
Save iskenxan/73ff8acd619515cf740d3cd692cef7df to your computer and use it in GitHub Desktop.
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
const ReceiptManager = require('./receipt-manager'); | |
const { | |
EmailStrategy, | |
SlackStrategy, | |
} = require('./strategy'); | |
function main(orderId, userEmail) { | |
const manager = new ReceiptManager(); | |
const email = new EmailStrategy(); | |
manager.sendReceipt(orderId, userEmail, email); | |
const slack = new SlackStrategy(); | |
manager.sendReceipt(orderId, userEmail, slack); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment