Skip to content

Instantly share code, notes, and snippets.

@andresmijares
Last active March 19, 2017 20:18
Show Gist options
  • Save andresmijares/66e6ce1ea297273addfbc93bc3e8ebc7 to your computer and use it in GitHub Desktop.
Save andresmijares/66e6ce1ea297273addfbc93bc3e8ebc7 to your computer and use it in GitHub Desktop.
class marketPlace extends Gateway {
/* info omitted for convinience */
audit = {}
marketOne (id) { /* ... */}
marketTwo (id) { /* ... */}
marketThree (id, order) { /* ... */}
exec (command, ...rest) {
if (this.audit[command]) {
this.audit[command].push(rest)
} else {
this.audit[command] = [rest]
}
Gateway.prototype.exec(command, rest)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment