Module: Ea::Bridge::QeaToUml
- Defined in:
- lib/ea/bridge/qea_to_uml.rb
Overview
Transforms an Ea::Qea::Database into a Lutaml::Uml::Document.
This is the bridge between ea's internal EA-native representation
(the SQLite-derived row models) and the tool-agnostic UML
metamodel from lutaml-uml.
The heavy lifting is done by the existing factory classes under
Ea::Qea::Factory::*. This module is the clean public entry
point — consumers should call Ea::Bridge::QeaToUml.transform(db)
rather than reaching into the factory internals.
Class Method Summary collapse
- .factory(database, options) ⇒ Object
- .require_lutaml_uml! ⇒ Object
- .transform(database, options = {}) ⇒ Lutaml::Uml::Document
Class Method Details
.factory(database, options) ⇒ Object
34 35 36 |
# File 'lib/ea/bridge/qea_to_uml.rb', line 34 def factory(database, ) Ea::Qea::Factory::EaToUmlFactory.new(database, ) end |
.require_lutaml_uml! ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/ea/bridge/qea_to_uml.rb', line 26 def require_lutaml_uml! require "lutaml/uml" rescue LoadError => e raise Ea::Error, "Ea::Bridge requires the `lutaml-uml` gem. " \ "Install it via `gem install lutaml-uml`. (#{e.})" end |
.transform(database, options = {}) ⇒ Lutaml::Uml::Document
21 22 23 24 |
# File 'lib/ea/bridge/qea_to_uml.rb', line 21 def transform(database, = {}) require_lutaml_uml! factory(database, ).create_document end |