Module: AtlasEngine::AddressImporter::OpenAddress::PreparesGeoJsonFile

Extended by:
T::Sig
Includes:
HandlesBlob
Included in:
GeoJsonImportJob
Defined in:
app/jobs/atlas_engine/address_importer/open_address/prepares_geo_json_file.rb

Constant Summary collapse

ROOT_FOLDER =
"openaddress"

Instance Method Summary collapse

Instance Method Details

#download_geojson(&block) ⇒ Object



14
15
16
17
18
19
20
21
22
23
# File 'app/jobs/atlas_engine/address_importer/open_address/prepares_geo_json_file.rb', line 14

def download_geojson(&block)
  if @geojson_path.exist?
    yield
  else
    download_from_activestorage do |local_path|
      @geojson_path = local_path
      yield
    end
  end
end