Sha256: 8fd79e6537cb4dcbdd71eb6a1e3d0bd0a4db35bf02c7ebe8bcc860a74a229195

Contents?: true

Size: 597 Bytes

Versions: 17

Compression:

Stored size: 597 Bytes

Contents

module Representable::XML
  module Collection
    def self.included(base)
      base.send :include, Representable::XML
      base.send :include, Representable::Hash::Collection
      base.send :include, Methods
    end

    module Methods
      def create_representation_with(doc, options, format)
        bin = representable_map(options, format).first
        bin.write(doc, super, bin.name)
      end

      def update_properties_from(doc, *args)
        super(doc.search("./*"), *args) # pass the list of collection items to Hash::Collection#update_properties_from.
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 3 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/representable-3.2.0/lib/representable/xml/collection.rb
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/representable-3.2.0/lib/representable/xml/collection.rb
representable-3.2.0 lib/representable/xml/collection.rb
representable-3.1.1 lib/representable/xml/collection.rb
representable-3.1.0 lib/representable/xml/collection.rb
representable-3.0.4 lib/representable/xml/collection.rb
representable-3.0.3 lib/representable/xml/collection.rb
representable-3.0.2 lib/representable/xml/collection.rb
representable-3.0.1 lib/representable/xml/collection.rb
representable-3.0.0 lib/representable/xml/collection.rb
representable-2.4.1 lib/representable/xml/collection.rb
representable-2.4.0 lib/representable/xml/collection.rb
representable-2.4.0.rc5 lib/representable/xml/collection.rb
representable-2.4.0.rc4 lib/representable/xml/collection.rb
representable-2.4.0.rc3 lib/representable/xml/collection.rb
representable-2.4.0.rc2 lib/representable/xml/collection.rb
representable-2.4.0.rc1 lib/representable/xml/collection.rb