Sha256: 7ccc6ddb1870e12ef89a4cb953d456ed6b41013eea3c81564dd2b968592a8a7b

Contents?: true

Size: 475 Bytes

Versions: 10

Compression:

Stored size: 475 Bytes

Contents

require 'representable/hash/collection'

module Representable::XML
  module Collection
    include Representable::XML

    def self.included(base)
      base.class_eval do
        include Representable::Hash::Collection
        include Methods
      end
    end

    module Methods
      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

10 entries across 10 versions & 1 rubygems

Version Path
representable-1.7.7 lib/representable/xml/collection.rb
representable-1.7.6 lib/representable/xml/collection.rb
representable-1.7.5 lib/representable/xml/collection.rb
representable-1.7.4 lib/representable/xml/collection.rb
representable-1.7.3 lib/representable/xml/collection.rb
representable-1.7.2 lib/representable/xml/collection.rb
representable-1.7.1 lib/representable/xml/collection.rb
representable-1.7.0 lib/representable/xml/collection.rb
representable-1.6.1 lib/representable/xml/collection.rb
representable-1.6.0 lib/representable/xml/collection.rb