Class: Providers::Yelp::Business
- Inherits:
-
Object
- Object
- Providers::Yelp::Business
- Defined in:
- lib/providers/yelp/business.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#average_rating ⇒ Object
Returns the value of attribute average_rating.
-
#name ⇒ Object
Returns the value of attribute name.
-
#total_reviews ⇒ Object
Returns the value of attribute total_reviews.
-
#url ⇒ Object
Returns the value of attribute url.
-
#yelp_id ⇒ Object
Returns the value of attribute yelp_id.
Class Method Summary collapse
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
4 5 6 |
# File 'lib/providers/yelp/business.rb', line 4 def address @address end |
#average_rating ⇒ Object
Returns the value of attribute average_rating.
4 5 6 |
# File 'lib/providers/yelp/business.rb', line 4 def @average_rating end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/providers/yelp/business.rb', line 4 def name @name end |
#total_reviews ⇒ Object
Returns the value of attribute total_reviews.
4 5 6 |
# File 'lib/providers/yelp/business.rb', line 4 def total_reviews @total_reviews end |
#url ⇒ Object
Returns the value of attribute url.
4 5 6 |
# File 'lib/providers/yelp/business.rb', line 4 def url @url end |
#yelp_id ⇒ Object
Returns the value of attribute yelp_id.
4 5 6 |
# File 'lib/providers/yelp/business.rb', line 4 def yelp_id @yelp_id end |
Class Method Details
.build_business(node) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/providers/yelp/business.rb', line 6 def self.build_business(node) return nil if node.nil? || node["id"].nil? || node["name"].nil? || node["location"].nil? || node["location"].empty? || node["location"]["display_address"].nil? new(node) end |