Class: ViewModel::RdSapWrapper
- Inherits:
-
Object
- Object
- ViewModel::RdSapWrapper
- Extended by:
- Gem::Deprecate
- Defined in:
- lib/view_model/rd_sap_wrapper.rb
Instance Attribute Summary collapse
-
#schema_type ⇒ Object
readonly
Returns the value of attribute schema_type.
-
#view_model ⇒ Object
readonly
Returns the value of attribute view_model.
Instance Method Summary collapse
- #get_view_model ⇒ Object
-
#initialize(xml_doc, schema_type, additional_data = {}) ⇒ RdSapWrapper
constructor
A new instance of RdSapWrapper.
- #to_domestic_digest ⇒ Object
- #to_hash ⇒ Object
- #to_hash_ni ⇒ Object
- #to_hera_hash ⇒ Object
- #to_recommendation_report ⇒ Object
- #to_report ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(xml_doc, schema_type, additional_data = {}) ⇒ RdSapWrapper
Returns a new instance of RdSapWrapper.
5 6 7 8 9 10 11 12 |
# File 'lib/view_model/rd_sap_wrapper.rb', line 5 def initialize(xml_doc, schema_type, additional_data = {}) @schema_type = schema_type @view_model = build_view_model(xml_doc, schema_type) @summary = Presenter::RdSap::Summary.new(view_model) @report = Presenter::RdSap::Report.new(view_model, schema_type, additional_data) @recommendation_report = Presenter::RdSap::RecommendationReport.new(view_model) @domestic_digest = Presenter::RdSap::DomesticDigest.new(view_model, schema_type) end |
Instance Attribute Details
#schema_type ⇒ Object (readonly)
Returns the value of attribute schema_type.
3 4 5 |
# File 'lib/view_model/rd_sap_wrapper.rb', line 3 def schema_type @schema_type end |
#view_model ⇒ Object (readonly)
Returns the value of attribute view_model.
3 4 5 |
# File 'lib/view_model/rd_sap_wrapper.rb', line 3 def view_model @view_model end |
Instance Method Details
#get_view_model ⇒ Object
45 46 47 |
# File 'lib/view_model/rd_sap_wrapper.rb', line 45 def get_view_model view_model end |
#to_domestic_digest ⇒ Object
34 35 36 |
# File 'lib/view_model/rd_sap_wrapper.rb', line 34 def to_domestic_digest @domestic_digest.to_domestic_digest end |
#to_hash ⇒ Object
18 19 20 |
# File 'lib/view_model/rd_sap_wrapper.rb', line 18 def to_hash @summary.to_hash end |
#to_hash_ni ⇒ Object
22 23 24 |
# File 'lib/view_model/rd_sap_wrapper.rb', line 22 def to_hash_ni @report.to_hash_ni end |
#to_hera_hash ⇒ Object
38 39 40 |
# File 'lib/view_model/rd_sap_wrapper.rb', line 38 def to_hera_hash to_domestic_digest end |
#to_recommendation_report ⇒ Object
30 31 32 |
# File 'lib/view_model/rd_sap_wrapper.rb', line 30 def to_recommendation_report @recommendation_report.to_hash end |
#to_report ⇒ Object
26 27 28 |
# File 'lib/view_model/rd_sap_wrapper.rb', line 26 def to_report @report.to_hash end |
#type ⇒ Object
14 15 16 |
# File 'lib/view_model/rd_sap_wrapper.rb', line 14 def type :RdSAP end |