module Geoloco::Adapters::Fake
Fake
geocoding adapter
Constants
- DEFAULT_GEO
Public Class Methods
geocode(address, **_options)
click to toggle source
# File lib/geoloco/adapters/fake.rb, line 10 def geocode(address, **_options) location = @stub || Geoloco::Location.new( geometry: DEFAULT_GEO, full_address: address ) [location] end
stubbing(location) { || ... }
click to toggle source
# File lib/geoloco/adapters/fake.rb, line 18 def stubbing(location) @stub = location yield @stub = nil end