export class PolyPlugin {
  constructor(_name, _callback, _options) {
    this._name = _name;
    this._callback = _callback;
    this._options = _options;
  }
  name() {
    return this._name;
  }
  libraryName() {
    return this._options.libraryName;
  }
  init(poly) {
    this._callback(poly);
  }
  toJSON() {
    return {
      name: this._name,
      libraryName: this.libraryName()
    };
  }
}
