Sha256: 9a2a5f1031d0cf0d619c2c6a441243fc0dc9d6a8f21f6df402f8162b5bdd9990
Contents?: true
Size: 834 Bytes
Versions: 47
Compression:
Stored size: 834 Bytes
Contents
module ViewModel class AcCertWrapper attr_reader :view_model def initialize(xml_doc, schema_type) @view_model = build_view_model(xml_doc, schema_type) @summary = Presenter::AcCert::Summary.new(@view_model) end def type :AC_CERT end def to_hash @summary.to_hash end def get_view_model view_model end private def build_view_model(xml_doc, schema_type) case schema_type when :"CEPC-8.0.0" ViewModel::Cepc800::AcCert.new xml_doc when :"CEPC-NI-8.0.0" ViewModel::CepcNi800::AcCert.new xml_doc when :"CEPC-7.1" ViewModel::Cepc71::AcCert.new xml_doc when :"CEPC-7.0" ViewModel::Cepc70::AcCert.new xml_doc else raise ArgumentError, "Unsupported schema type" end end end end
Version data entries
47 entries across 47 versions & 1 rubygems