Class: ViewModel::CepcRrWrapper
- Inherits:
-
Object
- Object
- ViewModel::CepcRrWrapper
- Defined in:
- lib/view_model/cepc_rr_wrapper.rb
Instance Attribute Summary collapse
-
#view_model ⇒ Object
readonly
Returns the value of attribute view_model.
Instance Method Summary collapse
- #get_view_model ⇒ Object
-
#initialize(xml_doc, schema_type) ⇒ CepcRrWrapper
constructor
A new instance of CepcRrWrapper.
- #to_hash ⇒ Object
-
#to_report ⇒ Object
FIXME: Method name is not consistent for recommendation reports (see SAP/RdSAP).
- #type ⇒ Object
Constructor Details
#initialize(xml_doc, schema_type) ⇒ CepcRrWrapper
Returns a new instance of CepcRrWrapper.
5 6 7 8 9 |
# File 'lib/view_model/cepc_rr_wrapper.rb', line 5 def initialize(xml_doc, schema_type) @view_model = build_view_model(xml_doc, schema_type) @summary = Presenter::CepcRr::Summary.new(view_model) @recommendation_report = Presenter::CepcRr::RecommendationReport.new(view_model) end |
Instance Attribute Details
#view_model ⇒ Object (readonly)
Returns the value of attribute view_model.
3 4 5 |
# File 'lib/view_model/cepc_rr_wrapper.rb', line 3 def view_model @view_model end |
Instance Method Details
#get_view_model ⇒ Object
24 25 26 |
# File 'lib/view_model/cepc_rr_wrapper.rb', line 24 def get_view_model view_model end |
#to_hash ⇒ Object
15 16 17 |
# File 'lib/view_model/cepc_rr_wrapper.rb', line 15 def to_hash @summary.to_hash end |
#to_report ⇒ Object
FIXME: Method name is not consistent for recommendation reports (see SAP/RdSAP)
20 21 22 |
# File 'lib/view_model/cepc_rr_wrapper.rb', line 20 def to_report @recommendation_report.to_hash end |
#type ⇒ Object
11 12 13 |
# File 'lib/view_model/cepc_rr_wrapper.rb', line 11 def type :CEPC_RR end |