Sha256: 3140b094c3cb25b5fbfa722fb7a3429b5402070836671418ea509d01927e8e26

Contents?: true

Size: 1.31 KB

Versions: 4

Compression:

Stored size: 1.31 KB

Contents

# frozen_string_literal: true

module Bolognese
  module Writers
    module CrossciteWriter
      def crosscite
        hsh = {
          "id" => identifier,
          "doi" => doi,
          "url" => url,
          "types" => types,
          "creator" => creator,
          "title" => title,
          "publisher" => publisher,
          "periodical" => periodical,
          "keywords" => keywords,
          "contributor" => contributor,
          "dates" => dates,
          "publication_year" => publication_year,
          "language" => language,
          "alternate_identifiers" => alternate_identifiers,
          "size" => size,
          "formats" => formats,
          "version" => version,
          "rights" => rights,
          "description" => description,
          "volume" => volume,
          "issue" => issue,
          "first_page" => first_page,
          "last_page" => last_page,
          "geo_location" => geo_location,
          "funding_references" => funding_references,
          "related_identifiers" => related_identifiers,
          "schema_version" => schema_version,
          "provider_id" => provider_id,
          "client_id" => client_id,
          "provider" => service_provider,
          "state" => state
        }.compact
        JSON.pretty_generate hsh.presence
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bolognese-1.0.6 lib/bolognese/writers/crosscite_writer.rb
bolognese-1.0.5 lib/bolognese/writers/crosscite_writer.rb
bolognese-1.0.4 lib/bolognese/writers/crosscite_writer.rb
bolognese-1.0.3 lib/bolognese/writers/crosscite_writer.rb