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

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

Overview

ea diagrams ACTION FILE [NAME]

Actions:

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

list reads the EA database directly (no lutaml-uml required for QEA; XMI parsing via xmi gem only).

extract accepts QEA, XMI, or LUR. The Repository is built from the input file via RepositoryBuilder (single source of truth — QEA/XMI are parsed via Ea::Transformations, LUR is loaded natively via Repository.from_file).

Constant Summary collapse

ACTIONS =
%w[list extract].freeze

Constants included from RepositoryBuilder

RepositoryBuilder::LUR_EXT

Instance Method Summary collapse

Methods included from RepositoryBuilder

build_repository, lur?, require_lutaml_uml!, require_lutaml_uml_repository!

Methods inherited from Base

#initialize

Constructor Details

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

Instance Method Details

#callObject



24
25
26
27
28
29
30
31
# File 'lib/ea/cli/command/diagrams.rb', line 24

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