Class: ViewModel::AcCertWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/view_model/ac_cert_wrapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml_doc, schema_type) ⇒ AcCertWrapper

Returns a new instance of AcCertWrapper.



5
6
7
8
# File 'lib/view_model/ac_cert_wrapper.rb', line 5

def initialize(xml_doc, schema_type)
  @view_model = build_view_model(xml_doc, schema_type)
  @summary = Presenter::AcCert::Summary.new(@view_model)
end

Instance Attribute Details

#view_modelObject (readonly)

Returns the value of attribute view_model.



3
4
5
# File 'lib/view_model/ac_cert_wrapper.rb', line 3

def view_model
  @view_model
end

Instance Method Details

#get_view_modelObject



18
19
20
# File 'lib/view_model/ac_cert_wrapper.rb', line 18

def get_view_model
  view_model
end

#to_hashObject



14
15
16
# File 'lib/view_model/ac_cert_wrapper.rb', line 14

def to_hash
  @summary.to_hash
end

#typeObject



10
11
12
# File 'lib/view_model/ac_cert_wrapper.rb', line 10

def type
  :AC_CERT
end