import { AuguryCore } from '../augury-core.class' ; import { Plugin } from './plugin.class' ; export class PluginManager { constructor ( private readonly plugins , private readonly augury ) { this . addPlugins ( plugins ) ; } public addPlugins ( plugins ) { plugins . forEach ( plugin => this . addPlugin ( plugin ) ) ; } private addPlugin ( plugin ) { this . plugins . push ( plugin ) ; plugin . initialize ( this . augury ) ; } }