Class: Presenter::Sap::RecommendationReport
- Inherits:
-
Object
- Object
- Presenter::Sap::RecommendationReport
- Defined in:
- lib/presenter/sap/recommendation_report.rb
Instance Method Summary collapse
-
#initialize(view_model) ⇒ RecommendationReport
constructor
A new instance of RecommendationReport.
- #to_hash ⇒ Object
Constructor Details
#initialize(view_model) ⇒ RecommendationReport
Returns a new instance of RecommendationReport.
4 5 6 |
# File 'lib/presenter/sap/recommendation_report.rb', line 4 def initialize(view_model) @view_model = view_model end |
Instance Method Details
#to_hash ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/presenter/sap/recommendation_report.rb', line 8 def to_hash complete_recommendations = @view_model.recommendations_for_report.each do |recommendations| recommendations[:assessment_id] = @view_model.assessment_id end { recommendations: complete_recommendations } end |