Class: Review

Inherits:
Object
  • Object
show all
Defined in:
lib/Models/Review.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(platform, id, userName, rating, title, body, createdDateTimestamp, url, appVersion, territory) ⇒ Review

Returns a new instance of Review.



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/Models/Review.rb', line 5

def initialize(platform, id, userName, rating, title, body, createdDateTimestamp, url, appVersion, territory)
    @platform = platform # 來源平台 android or apple
    @id = id # review id
    @userName = userName # reviewer
    @rating = rating # 給予的 rating, 1~5
    @title = title # review 標題 (android 無此資料)
    @body = body # review 內容
    @createdDateTimestamp = createdDateTimestamp # review 建立時間
    @url = url # 前往 review 的連結 (apple 不提供後台指定到某個 review 的連結)
    @appVersion = appVersion # app 版本號
    @territory = territory # apple: 地區(TWN/JPN...), android: 語系(zh-tw/en...)
end

Instance Attribute Details

#appVersionObject

Returns the value of attribute appVersion.



4
5
6
# File 'lib/Models/Review.rb', line 4

def appVersion
  @appVersion
end

#bodyObject

Returns the value of attribute body.



4
5
6
# File 'lib/Models/Review.rb', line 4

def body
  @body
end

#createdDateTimestampObject

Returns the value of attribute createdDateTimestamp.



4
5
6
# File 'lib/Models/Review.rb', line 4

def createdDateTimestamp
  @createdDateTimestamp
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/Models/Review.rb', line 4

def id
  @id
end

#platformObject

Returns the value of attribute platform.



4
5
6
# File 'lib/Models/Review.rb', line 4

def platform
  @platform
end

#ratingObject

Returns the value of attribute rating.



4
5
6
# File 'lib/Models/Review.rb', line 4

def rating
  @rating
end

#territoryObject

Returns the value of attribute territory.



4
5
6
# File 'lib/Models/Review.rb', line 4

def territory
  @territory
end

#titleObject

Returns the value of attribute title.



4
5
6
# File 'lib/Models/Review.rb', line 4

def title
  @title
end

#urlObject

Returns the value of attribute url.



4
5
6
# File 'lib/Models/Review.rb', line 4

def url
  @url
end

#userNameObject

Returns the value of attribute userName.



4
5
6
# File 'lib/Models/Review.rb', line 4

def userName
  @userName
end