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
challah-rolls-0.2.0 vendor/bundle/gems/activeresource-3.2.9/lib/active_resource/formats/xml_format.rb
challah-rolls-0.2.0 vendor/bundle/gems/activeresource-3.2.8/lib/active_resource/formats/xml_format.rb
challah-rolls-0.2.0 vendor/bundle/gems/activeresource-3.2.7/lib/active_resource/formats/xml_format.rb
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.0.pre/vendor/bundle/gems/activeresource-3.2.7/lib/active_resource/formats/xml_format.rb
challah-0.8.3 vendor/bundle/gems/activeresource-3.2.8/lib/active_resource/formats/xml_format.rb
challah-0.8.3 vendor/bundle/gems/activeresource-3.2.9/lib/active_resource/formats/xml_format.rb
activeresource-3.2.9 lib/active_resource/formats/xml_format.rb
activeresource-3.2.9.rc3 lib/active_resource/formats/xml_format.rb
activeresource-3.2.9.rc2 lib/active_resource/formats/xml_format.rb
activeresource-3.2.9.rc1 lib/active_resource/formats/xml_format.rb
challah-0.8.1 vendor/bundle/gems/activeresource-3.2.8/lib/active_resource/formats/xml_format.rb
challah-rolls-0.1.0 vendor/bundle/gems/activeresource-3.2.7/lib/active_resource/formats/xml_format.rb
challah-rolls-0.1.0 vendor/bundle/gems/challah-0.8.0.pre/vendor/bundle/gems/activeresource-3.2.7/lib/active_resource/formats/xml_format.rb
challah-rolls-0.1.0 vendor/bundle/gems/activeresource-3.2.8/lib/active_resource/formats/xml_format.rb
challah-0.8.0.pre vendor/bundle/gems/activeresource-3.2.7/lib/active_resource/formats/xml_format.rb
challah-0.7.1 vendor/bundle/gems/activeresource-3.2.7/lib/active_resource/formats/xml_format.rb
challah-0.7.0 vendor/bundle/gems/activeresource-3.2.7/lib/active_resource/formats/xml_format.rb
challah-0.7.0.pre2 vendor/bundle/gems/activeresource-3.2.7/lib/active_resource/formats/xml_format.rb
activeresource-3.2.8 lib/active_resource/formats/xml_format.rb
activeresource-3.1.8 lib/active_resource/formats/xml_format.rb