Class: Providers::Yelp::Review
- Inherits:
-
Object
- Object
- Providers::Yelp::Review
- Defined in:
- lib/providers/yelp/review.rb
Instance Attribute Summary collapse
-
#author_name ⇒ Object
Returns the value of attribute author_name.
-
#comment ⇒ Object
Returns the value of attribute comment.
-
#rating ⇒ Object
Returns the value of attribute rating.
-
#reviewed_at ⇒ Object
Returns the value of attribute reviewed_at.
Instance Method Summary collapse
-
#initialize(node) ⇒ Review
constructor
A new instance of Review.
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_name ⇒ Object
Returns the value of attribute author_name.
4 5 6 |
# File 'lib/providers/yelp/review.rb', line 4 def @author_name end |
#comment ⇒ Object
Returns the value of attribute comment.
4 5 6 |
# File 'lib/providers/yelp/review.rb', line 4 def comment @comment end |
#rating ⇒ Object
Returns the value of attribute rating.
4 5 6 |
# File 'lib/providers/yelp/review.rb', line 4 def @rating end |
#reviewed_at ⇒ Object
Returns the value of attribute reviewed_at.
4 5 6 |
# File 'lib/providers/yelp/review.rb', line 4 def reviewed_at @reviewed_at end |