Class: Yelp::Endpoint::Business
- Inherits:
-
Object
- Object
- Yelp::Endpoint::Business
- Defined in:
- lib/yelp/endpoint/business.rb
Constant Summary collapse
- PATH =
'/v2/business/'
Instance Method Summary collapse
-
#business(id) ⇒ Response::Business
Make a request to the business endpoint on the API.
-
#initialize(client) ⇒ Business
constructor
A new instance of Business.
Constructor Details
#initialize(client) ⇒ Business
Returns a new instance of Business.
10 11 12 |
# File 'lib/yelp/endpoint/business.rb', line 10 def initialize(client) @client = client end |
Instance Method Details
#business(id) ⇒ Response::Business
Make a request to the business endpoint on the API
23 24 25 |
# File 'lib/yelp/endpoint/business.rb', line 23 def business(id) Response::Business.new(JSON.parse(business_request(id).body)) end |