Module: Fedora::XmlFormat

Extended by:
XmlFormat
Included in:
XmlFormat
Defined in:
lib/fedora/formats.rb

Instance Method Summary collapse

Instance Method Details

#decode(xml) ⇒ Object



17
18
19
# File 'lib/fedora/formats.rb', line 17

def decode(xml)
  from_xml_data(Hash.from_xml(xml))
end

#encode(hash) ⇒ Object



13
14
15
# File 'lib/fedora/formats.rb', line 13

def encode(hash)
  hash.to_xml
end

#extensionObject



5
6
7
# File 'lib/fedora/formats.rb', line 5

def extension
  "xml"
end

#mime_typeObject



9
10
11
# File 'lib/fedora/formats.rb', line 9

def mime_type
  "text/xml"
end