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-5.0.0 lib/active_resource/formats/xml_format.rb
activeresource-five-5.0.0 lib/active_resource/formats/xml_format.rb
activeresource-3.2.22.5 lib/active_resource/formats/xml_format.rb
activeresource-3.2.22.4 lib/active_resource/formats/xml_format.rb
activeresource-3.2.22.3 lib/active_resource/formats/xml_format.rb
activeresource-4.1.0 lib/active_resource/formats/xml_format.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activeresource-4.0.0/lib/active_resource/formats/xml_format.rb
activeresource-3.2.22.2 lib/active_resource/formats/xml_format.rb
activeresource-3.2.22.1 lib/active_resource/formats/xml_format.rb
active_mailer-0.0.10 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/activeresource-3.2.12/lib/active_resource/formats/xml_format.rb
activeresource-3.2.22 lib/active_resource/formats/xml_format.rb
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/activeresource-3.2.12/lib/active_resource/formats/xml_format.rb
activeresource-3.2.21 lib/active_resource/formats/xml_format.rb
activeresource-3.2.20 lib/active_resource/formats/xml_format.rb
activeresource-3.2.19 lib/active_resource/formats/xml_format.rb
activeresource-3.2.18 lib/active_resource/formats/xml_format.rb
activeresource-3.2.17 lib/active_resource/formats/xml_format.rb
activeresource-3.2.16 lib/active_resource/formats/xml_format.rb
activeresource-3.2.15 lib/active_resource/formats/xml_format.rb
activeresource-3.2.15.rc3 lib/active_resource/formats/xml_format.rb