Class: Yelp::Business
- Inherits:
-
Object
- Object
- Yelp::Business
- Defined in:
- lib/yelp2/business.rb
Instance Method Summary collapse
- #id ⇒ Object
- #image_url ⇒ Object
-
#initialize(hash) ⇒ Business
constructor
A new instance of Business.
- #location ⇒ Object
- #mobile_url ⇒ Object
- #name ⇒ Object
- #phone ⇒ Object
- #review_count ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(hash) ⇒ Business
Returns a new instance of Business.
6 7 8 |
# File 'lib/yelp2/business.rb', line 6 def initialize(hash) @hash = hash end |
Instance Method Details
#id ⇒ Object
10 11 12 |
# File 'lib/yelp2/business.rb', line 10 def id @hash["id"] end |
#image_url ⇒ Object
30 31 32 |
# File 'lib/yelp2/business.rb', line 30 def image_url @hash["image_url"] end |
#location ⇒ Object
38 39 40 |
# File 'lib/yelp2/business.rb', line 38 def location Yelp::Location.new(@hash["location"]) end |
#mobile_url ⇒ Object
26 27 28 |
# File 'lib/yelp2/business.rb', line 26 def mobile_url @hash["mobile_url"] end |
#name ⇒ Object
14 15 16 |
# File 'lib/yelp2/business.rb', line 14 def name @hash["name"] end |
#phone ⇒ Object
18 19 20 |
# File 'lib/yelp2/business.rb', line 18 def phone @hash["phone"] end |
#review_count ⇒ Object
34 35 36 |
# File 'lib/yelp2/business.rb', line 34 def review_count @hash["review_count"] end |
#url ⇒ Object
22 23 24 |
# File 'lib/yelp2/business.rb', line 22 def url @hash["url"] end |