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-5.0.0 lib/maremma/xml_converter.rb
commonmeta-ruby-3.13 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.12.1 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.12.0 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.11.0 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.9.0 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.8.3 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.8.2 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.8.1 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.8.0 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.7.3 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.7.2 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.7.1 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.7.0 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.6.1 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.6 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.5.5 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.5.4 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.5.3 lib/commonmeta/xml_converter.rb
commonmeta-ruby-3.5.2 lib/commonmeta/xml_converter.rb