Closed jstty closed 7 years ago
let Beelzebub = require('beelzebub'); let bz = Beelzebub(); class MyRealTasks extends Beelzebub.Tasks { task1 () { this.logger.log('MyRealTasks task1'); } task2 () { this.logger.log('MySubTasks task2'); } } class MyTaskInterface extends Beelzebub.Tasks { constructor (config) { super(config); } $beforeAll () { // this allows for dynamic interfacing base on configuration this.$isInterfactFor(MyRealTasks); } task1 () { this.logger.error('should be overriden'); } task2 () { this.logger.error('should be overriden'); } } bz.add(MyTaskInterface); bz.run('MyTaskInterface.task1');