Class: Ea::Cli::Command::Diagrams

Inherits:
Base
  • Object
show all
Defined in:
lib/ea/cli/command/diagrams.rb

Overview

ea diagrams ACTION FILE [NAME]

Actions:

list FILE           — list diagrams in a QEA/XMI file (standalone)
extract FILE NAME   — render the named diagram from a LUR file to SVG

list reads the EA database directly (no lutaml-uml required). extract delegates to Diagram::Extractor, which requires a .lur (Lutaml UML Repository) file. To render diagrams from a QEA, first convert it to .lur via the lutaml gem.

Constant Summary collapse

ACTIONS =
%w[list extract].freeze
LUR_EXT =
".lur"

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Ea::Cli::Command::Base

Instance Method Details

#callObject



20
21
22
23
24
25
26
27
# File 'lib/ea/cli/command/diagrams.rb', line 20

def call
  case action
  when "list"    then list
  when "extract" then extract
  else
    raise Ea::Cli::UnknownAction.new(action, valid: ACTIONS)
  end
end