Module: ActiveResource::Formats::XmlFormat
Instance Method Summary collapse
Instance Method Details
#decode(xml) ⇒ Object
20 21 22 |
# File 'lib/active_resource/formats/xml_format.rb', line 20 def decode(xml) Formats.remove_root(Hash.from_xml(xml)) end |
#encode(hash, options = {}) ⇒ Object
16 17 18 |
# File 'lib/active_resource/formats/xml_format.rb', line 16 def encode(hash, ={}) hash.to_xml() end |
#extension ⇒ Object
8 9 10 |
# File 'lib/active_resource/formats/xml_format.rb', line 8 def extension "xml" end |
#mime_type ⇒ Object
12 13 14 |
# File 'lib/active_resource/formats/xml_format.rb', line 12 def mime_type "application/xml" end |