# File lib/active_resource/formats/xml_format.rb, line 20 20: def decode(xml) 21: from_xml_data(Hash.from_xml(xml)) 22: end
# File lib/active_resource/formats/xml_format.rb, line 16 16: def encode(hash, options={}) 17: hash.to_xml(options) 18: end
Manipulate from_xml Hash, because xml_simple is not exactly what we want for Active Resource.
# File lib/active_resource/formats/xml_format.rb, line 27 27: def from_xml_data(data) 28: if data.is_a?(Hash) && data.keys.size == 1 29: data.values.first 30: else 31: data 32: end 33: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.