Last active
June 19, 2018 08:47
-
-
Save ssougnez/45c743f3fb7dfde97da8ef2fa51a1a43 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
export class Grid { | |
constructor(...drivers) { | |
this._drivers = drivers || []; | |
} | |
addDriver(driver) { | |
this._drivers.push(driver); | |
} | |
*[Symbol.iterator]() { | |
for (let i = 0, length = this._drivers.length; i < length; ++i) { | |
yield this._drivers[i]; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment