Sha256: 5904b041d321f1e72b7ad8e3bafd4934e8108c3b04dae2e83b3824aec101fac3

Contents?: true

Size: 406 Bytes

Versions: 163

Compression:

Stored size: 406 Bytes

Contents

require 'active_support/core_ext/hash/conversions'

module ActiveResource
  module Formats
    module XmlFormat
      extend self

      def extension
        "xml"
      end

      def mime_type
        "application/xml"
      end

      def encode(hash, options={})
        hash.to_xml(options)
      end

      def decode(xml)
        Formats.remove_root(Hash.from_xml(xml))
      end
    end
  end
end

Version data entries

163 entries across 137 versions & 13 rubygems

Version Path
activeresource-3.1.0.rc3 lib/active_resource/formats/xml_format.rb
activeresource-3.1.0.rc2 lib/active_resource/formats/xml_format.rb
activeresource-3.1.0.rc1 lib/active_resource/formats/xml_format.rb