Class: Zomato2::Review

Inherits:
EntityBase show all
Defined in:
lib/zomato2/review.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from EntityBase

#get

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_countObject (readonly)

Returns the value of attribute comments_count.



4
5
6
# File 'lib/zomato2/review.rb', line 4

def comments_count
  @comments_count
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/zomato2/review.rb', line 4

def id
  @id
end

#likesObject (readonly)

Returns the value of attribute likes.



4
5
6
# File 'lib/zomato2/review.rb', line 4

def likes
  @likes
end

#ratingObject (readonly)

Returns the value of attribute rating.



4
5
6
# File 'lib/zomato2/review.rb', line 4

def rating
  @rating
end

#rating_colorObject (readonly)

Returns the value of attribute rating_color.



4
5
6
# File 'lib/zomato2/review.rb', line 4

def rating_color
  @rating_color
end

#rating_textObject (readonly)

Returns the value of attribute rating_text.



4
5
6
# File 'lib/zomato2/review.rb', line 4

def rating_text
  @rating_text
end

#review_textObject (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_friendlyObject (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

#timestampObject (readonly)

Returns the value of attribute timestamp.



4
5
6
# File 'lib/zomato2/review.rb', line 4

def timestamp
  @timestamp
end

#userObject (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_sObject



21
# File 'lib/zomato2/review.rb', line 21

def to_s; super; end