Class: Providers::Citysearch::Review

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject

Returns the value of attribute author_name.



5
6
7
# File 'lib/providers/citysearch/review.rb', line 5

def author_name
  @author_name
end

#commentObject

Returns the value of attribute comment.



5
6
7
# File 'lib/providers/citysearch/review.rb', line 5

def comment
  @comment
end

#ratingObject

Returns the value of attribute rating.



5
6
7
# File 'lib/providers/citysearch/review.rb', line 5

def rating
  @rating
end

#reviewed_atObject

Returns the value of attribute reviewed_at.



5
6
7
# File 'lib/providers/citysearch/review.rb', line 5

def reviewed_at
  @reviewed_at
end