Class: Expressir::Eengine::CompareReport
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Expressir::Eengine::CompareReport
- Defined in:
- lib/expressir/eengine/compare_report.rb
Overview
Represents an Eengine comparison XML report Supports three modes: ARM, MIM, and Schema
Class Method Summary collapse
-
.from_file(path) ⇒ CompareReport
Load a CompareReport from an XML file.
-
.from_xml(xml_content) ⇒ CompareReport, ...
Parse XML and return appropriate report class based on mode.
Instance Method Summary collapse
-
#mode ⇒ String
Detect XML mode from the report.
Class Method Details
.from_file(path) ⇒ CompareReport
Load a CompareReport from an XML file
41 42 43 |
# File 'lib/expressir/eengine/compare_report.rb', line 41 def from_file(path) from_xml(File.read(path)) end |
.from_xml(xml_content) ⇒ CompareReport, ...
Parse XML and return appropriate report class based on mode
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/expressir/eengine/compare_report.rb', line 24 def from_xml(xml_content) mode = detect_mode(xml_content) case mode when "arm" ArmCompareReport.from_xml(xml_content) when "mim" MimCompareReport.from_xml(xml_content) else super end end |
Instance Method Details
#mode ⇒ String
Detect XML mode from the report
64 65 66 |
# File 'lib/expressir/eengine/compare_report.rb', line 64 def mode "schema" end |