Allow easier extension in subclasses w/ prototypes
This commit is contained in:
parent
bdf3c24388
commit
8d3c89076d
|
@ -32,11 +32,12 @@ module.exports = Adaptor = function Adaptor(opts) {
|
|||
this.self = this;
|
||||
this.name = opts.name;
|
||||
this.connection = opts.connection;
|
||||
this.commands = [];
|
||||
};
|
||||
|
||||
Utils.subclass(Adaptor, Basestar);
|
||||
|
||||
Adaptor.prototype.commands = [];
|
||||
|
||||
// Public: Connects to the adaptor, and triggers the provided callback when
|
||||
// done.
|
||||
//
|
||||
|
|
|
@ -33,11 +33,12 @@ module.exports = Driver = function Driver(opts) {
|
|||
this.name = opts.name;
|
||||
this.device = opts.device;
|
||||
this.connection = this.device.connection;
|
||||
this.commands = [];
|
||||
};
|
||||
|
||||
Utils.subclass(Driver, Basestar);
|
||||
|
||||
Driver.prototype.commands = [];
|
||||
|
||||
// Public: Starts up the driver, and triggers the provided callback when done.
|
||||
//
|
||||
// callback - function to run when the driver is started
|
||||
|
|
Loading…
Reference in New Issue