Class: Yelp4r::NeighborhoodSearch

Inherits:
Object
  • Object
show all
Defined in:
lib/yelp4r/neighborhood_search.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#clientObject

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)
  options = {:lat => lat, :long => long}
  process(options)
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 = "")
  options = {:location => location}
  options.merge!({:cc => cc}) unless cc.blank?
  process(options)
end