Class: GeocodingLite::Geocode
- Inherits:
-
Object
- Object
- GeocodingLite::Geocode
- Defined in:
- lib/geocoding_lite/geocode.rb
Instance Method Summary collapse
-
#initialize(service = nil) ⇒ Geocode
constructor
A new instance of Geocode.
- #lookup(location) ⇒ Object
Constructor Details
#initialize(service = nil) ⇒ Geocode
Returns a new instance of Geocode.
3 4 5 |
# File 'lib/geocoding_lite/geocode.rb', line 3 def initialize(service = nil) @service = service || GeocodingService.new end |
Instance Method Details
#lookup(location) ⇒ Object
7 8 9 |
# File 'lib/geocoding_lite/geocode.rb', line 7 def lookup(location) @service.lookup(location) end |