Class: SunDawg::GeonamesClientHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/geonames_client_helper.rb

Class Method Summary collapse

Class Method Details

.postal_code_to(params, options = {}) {|SunDawg::GeonamesClient.new(options), {:lat => get_lat(json), :lng => get_lng(json)}, json| ... } ⇒ Object

Yields:



4
5
6
7
# File 'lib/geonames_client_helper.rb', line 4

def self.postal_code_to(params, options = {})
  json = SunDawg::GeonamesClient.new(options.reject { |k, v| k == :json }.reject { |k, v| k == :camelize }).postal_code_lookup params
  yield(SunDawg::GeonamesClient.new(options), {:lat => get_lat(json), :lng => get_lng(json)}, json)
end