class Geocoder::Result::PostcodeAnywhereUk
def address
def address @data['Location'] end
def blank_result
def blank_result '' end
def city
def city # is this too big a jump to assume that the API always # returns a City, County as the last elements? city = @data['Location'].split(',')[-2] || blank_result city.strip end
def coordinates
def coordinates [@data['Latitude'].to_f, @data['Longitude'].to_f] end
def country
This is a UK only API; all results are UK specific and
def country 'United Kingdom' end
def country_code
def country_code 'UK' end
def os_grid
def os_grid @data['OsGrid'] end