Created
March 26, 2017 11:21
-
-
Save augustovictor/d979897c2ddcacbd8eec54a8d80a4e52 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
| // https://jsfiddle.net/pamadvmu/ | |
| function DataStream(solution, key) { | |
| this.solution = solution; | |
| this.key = key; | |
| this.exec = function() { | |
| return 'Executing ' + this.key; | |
| } | |
| } | |
| // This allow us to create shared functions in an organized way | |
| DataStream.prototype.toString = function() { | |
| return `Solution: ${this.solution} Key: ${this.key}`; | |
| }; | |
| var getQueue = new DataStream('sky_at_bko', 'sky_at_bko_ds_get_queue'); | |
| var getAllQueues = new DataStream('sky_at_bko', 'sky_at_bko_ds_get_all_queues'); | |
| console.log(getQueue.exec()); | |
| console.log(getAllQueues.exec()); | |
| console.log(getQueue.toString()); | |
| console.log(getAllQueues.toString()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment