Class: Yelp4r::NeighborhoodSearch
- Inherits:
-
Object
- Object
- Yelp4r::NeighborhoodSearch
- Defined in:
- lib/yelp4r/neighborhood_search.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
-
#initialize(client) ⇒ NeighborhoodSearch
constructor
A new instance of NeighborhoodSearch.
- #search_by_geocode(lat, long) ⇒ Object
- #search_by_location(location, cc = "") ⇒ Object
Constructor Details
#initialize(client) ⇒ NeighborhoodSearch
Returns a new instance of NeighborhoodSearch.
6 7 8 |
# File 'lib/yelp4r/neighborhood_search.rb', line 6 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
4 5 6 |
# File 'lib/yelp4r/neighborhood_search.rb', line 4 def client @client end |
Instance Method Details
#search_by_geocode(lat, long) ⇒ Object
10 11 12 13 |
# File 'lib/yelp4r/neighborhood_search.rb', line 10 def search_by_geocode(lat, long) = {:lat => lat, :long => long} process() end |
#search_by_location(location, cc = "") ⇒ Object
15 16 17 18 19 |
# File 'lib/yelp4r/neighborhood_search.rb', line 15 def search_by_location(location, cc = "") = {:location => location} .merge!({:cc => cc}) unless cc.blank? process() end |