Class: MARCAuthSerializer

Inherits:
ASpaceExport::Serializer show all
Defined in:
backend/app/exporters/serializers/marc_auth.rb

Overview

frozen_string_literal: true

Instance Method Summary collapse

Methods inherited from ASpaceExport::Serializer

inherited, serializer_for, serializer_for?, with_namespace

Instance Method Details

#serialize(marc, _opts = {}) ⇒ Object



6
7
8
9
10
11
# File 'backend/app/exporters/serializers/marc_auth.rb', line 6

def serialize(marc, _opts = {})
  builder = Nokogiri::XML::Builder.new(encoding: 'UTF-8') do |xml|
    _marc(marc, xml)
  end
  builder.to_xml.to_s
end