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
commonmeta-ruby-3.2.2 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.2.1 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.2.0 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.0.10 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.0.9 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.0.8 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.0.7 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.0.6 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.0.5 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.0.4 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.0.3 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.0.2 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.0.1 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.0.0 lib/commonmeta/xml_converter.rb
maremma-4.9.9 lib/maremma/xml_converter.rb
maremma-4.9.8 lib/maremma/xml_converter.rb
maremma-4.9.7 lib/maremma/xml_converter.rb
maremma-4.9.6 lib/maremma/xml_converter.rb
maremma-4.9.5 lib/maremma/xml_converter.rb
maremma-4.9.4 lib/maremma/xml_converter.rb