Sha256: c7b7372bae6488f2495ed072ff9fe01dca492e191fe7c015e0b3dfb2bfa8a107
Contents?: true
Size: 1.2 KB
Versions: 8
Compression:
Stored size: 1.2 KB
Contents
module GeoConcerns module Discovery class AbstractDocument attr_accessor :identifier, :provenance, :creator, :subject, :spatial, :temporal, :title, :description, :access_rights, :language, :issued, :publisher, :slug, :solr_coverage, :layer_year, :layer_modified, :geom_type, :format, :resource_type, :wxs_identifier, :dct_references, :fgdc, :iso19139, :mods, :download, :url, :thumbnail, :wxs_identifier, :wms_path, :wfs_path # Cleans the document hash by removing unused fields. # @param [Hash] document hash # @return [Hash] cleaned document hash def clean_document(hash) hash.delete_if do |_k, v| begin v.nil? || v.empty? rescue false end end end def to_hash(_arg) raise 'this method should be overriden and return the document as a hash' end def to_json(_arg) raise 'this method should be overriden and return the document as json' end def to_xml(_arg) raise 'this method should be overriden and return the document as xml' end end end end
Version data entries
8 entries across 8 versions & 1 rubygems