Class: Providers::Yelp::Review

Inherits:
Object
  • Object
show all
Defined in:
lib/providers/yelp/review.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ Review

Returns a new instance of Review.



6
7
8
9
10
11
# File 'lib/providers/yelp/review.rb', line 6

def initialize(node)
  @rating = node["rating"]
  @author_name = node["name"]
  @reviewed_at = Time.at(node["time_created"].to_i)
  @comment = node["excerpt"]
end

Instance Attribute Details

#author_nameObject

Returns the value of attribute author_name.



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

def author_name
  @author_name
end

#commentObject

Returns the value of attribute comment.



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

def comment
  @comment
end

#ratingObject

Returns the value of attribute rating.



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

def rating
  @rating
end

#reviewed_atObject

Returns the value of attribute reviewed_at.



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

def reviewed_at
  @reviewed_at
end