Sha256: 59835a0419796fde0f6912e9209c9a85e3ec60a850452e020b29550ad90f64e7
Contents?: true
Size: 1.14 KB
Versions: 3
Compression:
Stored size: 1.14 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 # 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
3 entries across 3 versions & 1 rubygems