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
53 54 55 |
# File 'lib/expressir/eengine/compare_report.rb', line 53 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
36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/expressir/eengine/compare_report.rb', line 36 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
76 77 78 |
# File 'lib/expressir/eengine/compare_report.rb', line 76 def mode "schema" end |