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