Class: Graticule::Geocoder::PostcodeAnywhere
- Defined in:
- lib/graticule/geocoder/postcode_anywhere.rb
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
Constructor Details
#initialize(account_code, license_code) ⇒ PostcodeAnywhere
7 8 9 10 11 |
# File 'lib/graticule/geocoder/postcode_anywhere.rb', line 7 def initialize(account_code, license_code) @url = URI.parse 'http://services.postcodeanywhere.co.uk/xml.aspx' @account_code = account_code @license_code = license_code end |
Instance Method Details
#locate(params) ⇒ Object
13 14 15 16 |
# File 'lib/graticule/geocoder/postcode_anywhere.rb', line 13 def locate(params) location = location_from_params(params) get :address => location.to_s(:country => false), :country => location.country end |