Class: Providers::Citysearch::Review
- Inherits:
-
Object
- Object
- Providers::Citysearch::Review
- Defined in:
- lib/providers/citysearch/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.
7 8 9 10 11 12 |
# File 'lib/providers/citysearch/review.rb', line 7 def initialize(node) @rating = node["review_rating"] @author_name = node["review_author"] @reviewed_at = DateTime.parse(node["review_date"]).to_time @comment = node["review_text"] end |
Instance Attribute Details
#author_name ⇒ Object
Returns the value of attribute author_name.
5 6 7 |
# File 'lib/providers/citysearch/review.rb', line 5 def @author_name end |
#comment ⇒ Object
Returns the value of attribute comment.
5 6 7 |
# File 'lib/providers/citysearch/review.rb', line 5 def comment @comment end |
#rating ⇒ Object
Returns the value of attribute rating.
5 6 7 |
# File 'lib/providers/citysearch/review.rb', line 5 def @rating end |
#reviewed_at ⇒ Object
Returns the value of attribute reviewed_at.
5 6 7 |
# File 'lib/providers/citysearch/review.rb', line 5 def reviewed_at @reviewed_at end |