Class: ViewModel::AcReportWrapper

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml_doc, schema_type) ⇒ AcReportWrapper

Returns a new instance of AcReportWrapper.



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

def initialize(xml_doc, schema_type)
  @view_model = build_view_model(xml_doc, schema_type)
  @summary = Presenter::AcReport::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_report_wrapper.rb', line 3

def view_model
  @view_model
end

Instance Method Details

#get_view_modelObject



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

def get_view_model
  view_model
end

#to_hashObject



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

def to_hash
  @summary.to_hash
end

#typeObject



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

def type
  :AC_REPORT
end