Class: GoogleReviews::Review
- Inherits:
-
Object
- Object
- GoogleReviews::Review
- Defined in:
- lib/google_reviews/review.rb
Overview
Google Review Object
Instance Attribute Summary collapse
-
#author_name ⇒ Object
Returns the value of attribute author_name.
-
#author_url ⇒ Object
Returns the value of attribute author_url.
-
#language ⇒ Object
Returns the value of attribute language.
-
#original_language ⇒ Object
Returns the value of attribute original_language.
-
#profile_photo_url ⇒ Object
Returns the value of attribute profile_photo_url.
-
#rating ⇒ Object
Returns the value of attribute rating.
-
#relative_time_description ⇒ Object
Returns the value of attribute relative_time_description.
-
#text ⇒ Object
Returns the value of attribute text.
-
#time ⇒ Object
Returns the value of attribute time.
-
#translated ⇒ Object
Returns the value of attribute translated.
Instance Method Summary collapse
-
#initialize(data) ⇒ Review
constructor
A new instance of Review.
Constructor Details
#initialize(data) ⇒ Review
Returns a new instance of Review.
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/google_reviews/review.rb', line 9 def initialize(data) @text = data["text"] @time = data["time"] @rating = data["rating"] @language = data["language"] @author_url = data["author_url"] @translated = data["translated"] @author_name = data["author_name"] @original_language = data["original_language"] @profile_photo_url = data["profile_photo_url"] @relative_time_description = data["relative_time_description"] end |
Instance Attribute Details
#author_name ⇒ Object
Returns the value of attribute author_name.
6 7 8 |
# File 'lib/google_reviews/review.rb', line 6 def @author_name end |
#author_url ⇒ Object
Returns the value of attribute author_url.
6 7 8 |
# File 'lib/google_reviews/review.rb', line 6 def @author_url end |
#language ⇒ Object
Returns the value of attribute language.
6 7 8 |
# File 'lib/google_reviews/review.rb', line 6 def language @language end |
#original_language ⇒ Object
Returns the value of attribute original_language.
6 7 8 |
# File 'lib/google_reviews/review.rb', line 6 def original_language @original_language end |
#profile_photo_url ⇒ Object
Returns the value of attribute profile_photo_url.
6 7 8 |
# File 'lib/google_reviews/review.rb', line 6 def profile_photo_url @profile_photo_url end |
#rating ⇒ Object
Returns the value of attribute rating.
6 7 8 |
# File 'lib/google_reviews/review.rb', line 6 def @rating end |
#relative_time_description ⇒ Object
Returns the value of attribute relative_time_description.
6 7 8 |
# File 'lib/google_reviews/review.rb', line 6 def relative_time_description @relative_time_description end |
#text ⇒ Object
Returns the value of attribute text.
6 7 8 |
# File 'lib/google_reviews/review.rb', line 6 def text @text end |
#time ⇒ Object
Returns the value of attribute time.
6 7 8 |
# File 'lib/google_reviews/review.rb', line 6 def time @time end |
#translated ⇒ Object
Returns the value of attribute translated.
6 7 8 |
# File 'lib/google_reviews/review.rb', line 6 def translated @translated end |