Skip to content

Commit

Permalink
Merge pull request #142 from primea/container-types
Browse files Browse the repository at this point in the history
added container-types
  • Loading branch information
wanderer committed Aug 2, 2017
2 parents 36f1183 + 82c1875 commit 80537e8
Show file tree
Hide file tree
Showing 2 changed files with 192 additions and 122 deletions.
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,12 @@ module.exports = class Hypervisor {

/**
* regirsters a container with the hypervisor
* @param {String} type - the name of the type
* @param {Class} Constructor - a Class for instantiating the container
* @param {*} args - any args that the contructor takes
* @param {interger} typeId - the container's type identification ID
*/
registerContainer (type, Constructor, args) {
Constructor.type = type
this._containerTypes[type] = {
registerContainer (Constructor, args, typeId = Constructor.typeId) {
this._containerTypes[typeId] = {
Constructor: Constructor,
args: args
}
Expand Down

0 comments on commit 80537e8

Please sign in to comment.