Sha256: ff8bc1a1df80646fc5044b17849e481a1e99e6ecc3e8bb900308000fc272edea

Contents?: true

Size: 1.29 KB

Versions: 2

Compression:

Stored size: 1.29 KB

Contents

$lib = File.expand_path('../', File.dirname(__FILE__))

class Processor

    attr_accessor :config, :configFilePath, :baseExecutePath

    def initialize(config, configFilePath, baseExecutePath)
        @config = config
        @configFilePath = configFilePath
        @baseExecutePath = baseExecutePath
    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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ZReviewTender-1.3.8 lib/Models/Processor.rb
ZReviewTender-1.3.7 lib/Models/Processor.rb