class Mcll4r

Public Instance Methods

district_lookup(lat, lng) click to toggle source
# File lib/mcll4r.rb, line 9
def district_lookup(lat, lng)
  filter_for_errors self.class.get("/districts/lookup.xml", :query=>{:lat=>lat, :lng=>lng})
end

Private Instance Methods

filter_for_errors(hash) click to toggle source
# File lib/mcll4r.rb, line 15
def filter_for_errors(hash)
  if hash['response']['error']
    raise DistrictNotFound.new(hash['response']['error'])
  end
  hash
end