Class: Ea::Cli::Command::Convert
- Defined in:
- lib/ea/cli/command/convert.rb
Overview
ea convert FILE --to xmi [--output PATH]
Converts an EA file to another format. Currently supports:
--to xmi .qea → Sparx XMI (direct, full Sparx fidelity)
Routing is by input file extension:
.qea → Ea::Transformers.qea_to_xmi (direct path, no intermediate
UML model — preserves all Sparx-specific concepts)
any other extension → UnsupportedFormat
Future formats (e.g. parsing a Lutaml::LML .lur file) are added by extending the case statement in #convert_to_xmi.
Constant Summary collapse
- SUPPORTED_TARGETS =
%w[xmi].freeze
- SUPPORTED_INPUT_FORMATS =
%i[qea].freeze
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
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/ea/cli/command/convert.rb', line 22 def call target = [:to] or raise Ea::Cli::Error, "missing required --to" case target.to_s when "xmi" then convert_to_xmi else raise Ea::Cli::Error, "Unsupported target '#{target}'. " \ "Valid: #{SUPPORTED_TARGETS.join(', ')}" end end |