Class: Ea::Cli::Command::Svg
Overview
ea svg NAME FILE [--output=PATH]
Renders a single diagram from a QEA or XMI file into a standalone SVG using the umldi content (placed element bounds + connector waypoints) captured in Ea::Model::Diagram.
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Ea::Cli::Command::Base
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ea/cli/command/svg.rb', line 14 def call diagram = find_diagram svg = Ea::Svg::Renderer.new(diagram, model_index: document.index_by_id).render output_path = resolve_output_path(diagram) FileUtils.mkdir_p(File.dirname(output_path)) File.write(output_path, svg) formatter.render([[output_path]], columns: [:written_to]) end |