class Pumi::DataSource::Geocoder
def load_data!(output_dir: "data")
def load_data!(output_dir: "data") data.each do |code, attributes| geocoded_result = geocoded_results.find { |r| r.code == code } next if geocoded_result.nil? attributes["geodata"] ||= {} attributes["geodata"]["lat"] = geocoded_result.lat attributes["geodata"]["long"] = geocoded_result.long attributes["geodata"]["bounding_box"] = geocoded_result.bounding_box end write_data!(output_dir) end