Module: Geoloco::Adapters::Fake
- Defined in:
- lib/geoloco/adapters/fake.rb
Overview
Fake geocoding adapter
Constant Summary collapse
Class Method Summary collapse
Class Method Details
.geocode(address, **_options) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/geoloco/adapters/fake.rb', line 10 def geocode(address, **) location = @stub || Geoloco::Location.new( geometry: DEFAULT_GEO, full_address: address ) [location] end |
.stubbing(location) ⇒ Object
18 19 20 21 22 |
# File 'lib/geoloco/adapters/fake.rb', line 18 def stubbing(location) @stub = location yield @stub = nil end |