lib/Models/Processor.rb in ZReviewTender-1.3.6 vs lib/Models/Processor.rb in ZReviewTender-1.3.7

- old
+ new

@@ -11,6 +11,21 @@ end def processReviews(reviews, platform) end + + def renderReview(templateText, review, timeZoneOffset) + templateText = templateText.gsub("%TITLE%", review.title || "") + templateText = templateText.gsub("%BODY%", review.body || "") + templateText = templateText.gsub("%RATING%", review.rating.nil? ? "" :review.rating.to_s) + templateText = templateText.gsub("%PLATFORM%", review.platform || "") + templateText = templateText.gsub("%ID%", review.id || "") + templateText = templateText.gsub("%USERNAME%", review.userName || "") + templateText = templateText.gsub("%URL%", review.url || "") + templateText = templateText.gsub("%TERRITORY%", review.territory || "") + templateText = templateText.gsub("%APPVERSION%", review.appVersion || "") + templateText = templateText.gsub("%CREATEDDATE%", review.createdDateTimestamp.nil? ? "" : Time.at(review.createdDateTimestamp).getlocal(timeZoneOffset).to_s) + + return templateText + end end \ No newline at end of file