Class: TraceViz::Exporters::Registry
- Inherits:
-
Object
- Object
- TraceViz::Exporters::Registry
- Defined in:
- lib/trace_viz/exporters/registry.rb
Constant Summary collapse
- EXPORTS =
{ txt: TextExporter, mermaid: MermaidExporter, }
Class Method Summary collapse
Class Method Details
.build(format, *options) ⇒ Object
15 16 17 18 19 |
# File 'lib/trace_viz/exporters/registry.rb', line 15 def build(format, *) raise ArgumentError unless supported_formats.include?(format) EXPORTS[format].new(*) end |
.supported_formats ⇒ Object
21 22 23 |
# File 'lib/trace_viz/exporters/registry.rb', line 21 def supported_formats EXPORTS.keys end |