Class: DCSerializer
Instance Method Summary
collapse
inherited, serializer_for, serializer_for?, with_namespace
Instance Method Details
#build(dc, opts = {}) ⇒ Object
4
5
6
7
8
9
10
|
# File 'backend/app/exporters/serializers/dc.rb', line 4
def build(dc, opts = {})
builder = Nokogiri::XML::Builder.new(:encoding => "UTF-8") do |xml|
_root(dc, xml)
end
builder
end
|
#serialize(dc, opts = {}) ⇒ Object
12
13
14
15
16
|
# File 'backend/app/exporters/serializers/dc.rb', line 12
def serialize(dc, opts = {})
builder = build(dc, opts)
builder.to_xml
end
|
#serialize_dc(dc, xml) ⇒ Object
18
19
20
|
# File 'backend/app/exporters/serializers/dc.rb', line 18
def serialize_dc(dc, xml)
_root(dc, xml)
end
|