Sha256: 1e0c3fbf8e83e628b04e43373dc9cd5406c56049d3d2782db6fcce43447da741

Contents?: true

Size: 361 Bytes

Versions: 97

Compression:

Stored size: 361 Bytes

Contents

# frozen_string_literal: true

# modified from http://stackoverflow.com/a/29431089
# preserve attributes in xml

module ActiveSupport
  class XMLConverter
    private

    def become_content?(value)
      value['type'] == 'file' || value['type'] == 'string' || (value['__content__'] && (value.keys.size == 1 && value['__content__'].present?))
    end
  end
end

Version data entries

97 entries across 97 versions & 2 rubygems

Version Path
maremma-4.9.3 lib/maremma/xml_converter.rb
maremma-4.9.2 lib/maremma/xml_converter.rb
maremma-4.9 lib/maremma/xml_converter.rb
maremma-4.7.4 lib/maremma/xml_converter.rb
maremma-4.7.2 lib/maremma/xml_converter.rb
maremma-4.7.1 lib/maremma/xml_converter.rb
maremma-4.8 lib/maremma/xml_converter.rb
maremma-4.7 lib/maremma/xml_converter.rb
maremma-4.6.1 lib/maremma/xml_converter.rb
maremma-4.6 lib/maremma/xml_converter.rb
maremma-4.5 lib/maremma/xml_converter.rb
maremma-4.4 lib/maremma/xml_converter.rb
maremma-4.3 lib/maremma/xml_converter.rb
maremma-4.2.6 lib/maremma/xml_converter.rb
maremma-4.2.5 lib/maremma/xml_converter.rb
maremma-4.2.4 lib/maremma/xml_converter.rb
maremma-4.2.3 lib/maremma/xml_converter.rb