Class: Zomato2::Review
- Inherits:
-
EntityBase
- Object
- EntityBase
- Zomato2::Review
- Defined in:
- lib/zomato2/review.rb
Instance Attribute Summary collapse
-
#comments_count ⇒ Object
readonly
Returns the value of attribute comments_count.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#likes ⇒ Object
readonly
Returns the value of attribute likes.
-
#rating ⇒ Object
readonly
Returns the value of attribute rating.
-
#rating_color ⇒ Object
readonly
Returns the value of attribute rating_color.
-
#rating_text ⇒ Object
readonly
Returns the value of attribute rating_text.
-
#review_text ⇒ Object
readonly
Returns the value of attribute review_text.
-
#review_time_friendly ⇒ Object
readonly
Returns the value of attribute review_time_friendly.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(zom_conn, attributes) ⇒ Review
constructor
A new instance of Review.
- #to_s ⇒ Object
Methods inherited from EntityBase
Constructor Details
#initialize(zom_conn, attributes) ⇒ Review
Returns a new instance of Review.
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/zomato2/review.rb', line 7 def initialize(zom_conn, attributes) super(zom_conn) self.instance_variables.each do |att| if att === :@zom_conn next elsif att === :@user @user = User.new zom_conn, attributes['user'] else self.instance_variable_set attributes[att] end end end |
Instance Attribute Details
#comments_count ⇒ Object (readonly)
Returns the value of attribute comments_count.
4 5 6 |
# File 'lib/zomato2/review.rb', line 4 def comments_count @comments_count end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/zomato2/review.rb', line 4 def id @id end |
#likes ⇒ Object (readonly)
Returns the value of attribute likes.
4 5 6 |
# File 'lib/zomato2/review.rb', line 4 def likes @likes end |
#rating ⇒ Object (readonly)
Returns the value of attribute rating.
4 5 6 |
# File 'lib/zomato2/review.rb', line 4 def @rating end |
#rating_color ⇒ Object (readonly)
Returns the value of attribute rating_color.
4 5 6 |
# File 'lib/zomato2/review.rb', line 4 def @rating_color end |
#rating_text ⇒ Object (readonly)
Returns the value of attribute rating_text.
4 5 6 |
# File 'lib/zomato2/review.rb', line 4 def @rating_text end |
#review_text ⇒ Object (readonly)
Returns the value of attribute review_text.
4 5 6 |
# File 'lib/zomato2/review.rb', line 4 def review_text @review_text end |
#review_time_friendly ⇒ Object (readonly)
Returns the value of attribute review_time_friendly.
4 5 6 |
# File 'lib/zomato2/review.rb', line 4 def review_time_friendly @review_time_friendly end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
4 5 6 |
# File 'lib/zomato2/review.rb', line 4 def @timestamp end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
4 5 6 |
# File 'lib/zomato2/review.rb', line 4 def user @user end |
Instance Method Details
#to_s ⇒ Object
21 |
# File 'lib/zomato2/review.rb', line 21 def to_s; super; end |