Module: Portero
- Defined in:
- lib/portero/portero.rb,
lib/portero/version.rb,
lib/portero/search_result.rb,
lib/portero/search_provider.rb,
lib/portero/providers/foursquare.rb,
lib/portero/providers/google_places.rb
Defined Under Namespace
Modules: SearchProvider
Classes: SearchResult
Constant Summary
collapse
- VERSION =
"0.0.5"
Class Method Summary
collapse
Class Method Details
.init! ⇒ Object
12
13
14
15
16
|
# File 'lib/portero/portero.rb', line 12
def self.init!
@conn = Faraday.new do |builder|
builder.adapter Faraday.default_adapter
end
end
|
.providers ⇒ Object
30
31
32
|
# File 'lib/portero/portero.rb', line 30
def self.providers
@providers
end
|
.providers=(providers) ⇒ Object
26
27
28
|
# File 'lib/portero/portero.rb', line 26
def self.providers=(providers)
@providers = providers
end
|
.search(query, latitude, longitude, options = {}) ⇒ Object
18
19
20
21
22
23
24
|
# File 'lib/portero/portero.rb', line 18
def self.search(query, latitude, longitude, options = {})
results = []
@providers.each do |provider|
results += provider.search(@conn, query, latitude, longitude, options)
end
results
end
|