Sha256: bccfe1d77ae490bcfb63c0994f9c96c18b3961fd64f28b01dbfad7f1804b7b52

Contents?: true

Size: 491 Bytes

Versions: 3

Compression:

Stored size: 491 Bytes

Contents

require 'xml/mapping'

class Entry
  include XML::Mapping

  text_node :name, "name"
end


class Document <Entry
  include XML::Mapping

  text_node :contents, "contents"

  def ==(other)
    Document===other and
      other.name==self.name and
      other.contents==self.contents
  end
end


class Folder <Entry
  include XML::Mapping

  array_node :entries, "entries", "*"

  def ==(other)
    Folder===other and
      other.name==self.name and
      other.entries==self.entries
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
pdf-labels-1.0.0 vendor/xml-mapping/test/documents_folders.rb
xml-mapping-0.8 test/documents_folders.rb
xml-mapping-0.8.1 test/documents_folders.rb