getOutputGenerator method
Implementation
OutputGenerator getOutputGenerator() {
final format = argResults?['format'] as String;
// Select the appropriate generator
final OutputGenerator generator;
switch (format) {
case 'json':
generator = JsonGenerator();
break;
case 'dot':
generator = DotGenerator(
graphName: 'Dependencies',
generalStyling: 'node [style=filled];',
);
break;
case 'gexf':
generator = GexfGenerator();
break;
case 'graphml':
generator = GraphMLGenerator();
break;
default:
generator = JsonGenerator();
break;
}
return generator;
}