mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 17:35:16 +00:00
17 lines
362 B
JavaScript
17 lines
362 B
JavaScript
|
'use strict';
|
||
|
|
||
|
// TODO: switch to class private field when targetting node.js 12
|
||
|
const _summarizer = Symbol('ReportBase.#summarizer');
|
||
|
|
||
|
class ReportBase {
|
||
|
constructor(opts = {}) {
|
||
|
this[_summarizer] = opts.summarizer;
|
||
|
}
|
||
|
|
||
|
execute(context) {
|
||
|
context.getTree(this[_summarizer]).visit(this, context);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = ReportBase;
|