Skip to content

Commit

Permalink
modify adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
lsongdev committed Mar 5, 2020
1 parent 24d27b6 commit 3f99fc0
Showing 1 changed file with 14 additions and 52 deletions.
66 changes: 14 additions & 52 deletions packages/adapter/index.js
Original file line number Diff line number Diff line change
@@ -1,57 +1,19 @@
'use strict';
const util = require('util');
const EventEmitter = require('events');

/**
* [Adapter description]
*/
function Adapter(){
EventEmitter.call(this);
return this;
class NotImplementedException extends Error {
// Nothing.
}

util.inherits(Adapter, EventEmitter);

/**
* [extends description]
* @param {[type]} ctor [description]
* @return {[type]} [description]
*/
Adapter.extends = function(ctor){
// console.log(ctor);
util.inherits(ctor, Adapter);
return ctor;
};

/**
* [open description]
* @return {[type]} [description]
*/
Adapter.prototype.open = function () {
throw new Error('NotImplementedException');
return this;
};

/**
* [close description]
* @return {[type]} [description]
*/
Adapter.prototype.close = function () {
throw new Error('NotImplementedException');
return this;
};

/**
* [write description]
* @return {[type]} [description]
*/
Adapter.prototype.write = function () {
throw new Error('NotImplementedException');
return this;
};

/**
* [exports description]
* @type {[type]}
*/
module.exports = Adapter;
class Adapter extends EventEmitter {
open() {
throw new NotImplementedException();
}
write() {
throw new NotImplementedException();
}
close() {
throw new NotImplementedException();
}
}
module.exports = Adapter;

0 comments on commit 3f99fc0

Please sign in to comment.