class SpatialFeatures::Importers::KMLFile
Public Class Methods
new(path_or_url, *args)
click to toggle source
Calls superclass method
SpatialFeatures::Importers::Base::new
# File lib/spatial_features/importers/kml_file.rb, line 4 def initialize(path_or_url, *args) super Download.read(path_or_url, unzip: '.kml'), *args rescue SocketError, Errno::ECONNREFUSED, OpenURI::HTTPError url = URI(path_or_url) raise ImportError, "KML server is not responding. Ensure server is running and accessible at #{[url.scheme, "//#{url.host}", url.port].select(&:present?).join(':')}." end