Class: Graticule::Geocoder::GeocoderCa

Inherits:
Base
  • Object
show all
Defined in:
lib/graticule/geocoder/geocoder_ca.rb

Overview

TODO: Reverse Geocoding

Defined Under Namespace

Classes: Response

Constant Summary

Constants inherited from Base

Base::USER_AGENT

Instance Method Summary collapse

Constructor Details

#initialize(auth = nil) ⇒ GeocoderCa

Returns a new instance of GeocoderCa.


8
9
10
11
# File 'lib/graticule/geocoder/geocoder_ca.rb', line 8

def initialize(auth = nil)
  @url = URI.parse 'http://geocoder.ca/'
  @auth = auth
end

Instance Method Details

#locate(address) ⇒ Object


13
14
15
# File 'lib/graticule/geocoder/geocoder_ca.rb', line 13

def locate(address)
  get :locate => address.is_a?(String) ? address : location_from_params(address).to_s(:country => false)
end