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.2.8.rc2 lib/active_resource/formats/xml_format.rb
challah-0.7.0.pre vendor/bundle/gems/activeresource-3.2.7/lib/active_resource/formats/xml_format.rb
activeresource-3.2.8.rc1 lib/active_resource/formats/xml_format.rb
activeresource-3.2.7 lib/active_resource/formats/xml_format.rb
activeresource-3.1.7 lib/active_resource/formats/xml_format.rb
activeresource-3.2.7.rc1 lib/active_resource/formats/xml_format.rb
challah-0.6.2 vendor/bundle/gems/activeresource-3.2.2/lib/active_resource/formats/xml_format.rb
challah-0.6.2 vendor/bundle/gems/activeresource-3.2.6/lib/active_resource/formats/xml_format.rb
challah-0.6.2 vendor/bundle/gems/activeresource-3.2.3/lib/active_resource/formats/xml_format.rb
challah-0.6.2 vendor/bundle/gems/activeresource-3.2.5/lib/active_resource/formats/xml_format.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/activeresource-3.2.3/lib/active_resource/formats/xml_format.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/activeresource-3.2.3/lib/active_resource/formats/xml_format.rb
initforthe-cookies-0.0.1 vendor/bundle/gems/activeresource-3.2.6/lib/active_resource/formats/xml_format.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/activeresource-3.2.3/lib/active_resource/formats/xml_format.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/activeresource-3.2.3/lib/active_resource/formats/xml_format.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/activeresource-3.2.3/lib/active_resource/formats/xml_format.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/activeresource-3.2.3/lib/active_resource/formats/xml_format.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/activeresource-3.2.3/lib/active_resource/formats/xml_format.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/activeresource-3.2.3/lib/active_resource/formats/xml_format.rb
rails-uploader-0.0.4 vendor/bundle/ruby/1.9.1/gems/activeresource-3.2.3/lib/active_resource/formats/xml_format.rb