Sha256: b9c41c82fceccaf3d4a38a3336edf4c5af3817d57da4270a3a32fce284c02267

Contents?: true

Size: 838 Bytes

Versions: 13

Compression:

Stored size: 838 Bytes

Contents

module Ox
  # Represents an XML document. It has a fixed set of attributes which form
  # the XML prolog. A Document includes Elements.
  class Document < Element
    # Create a new Document.
    # @param [Hash] prolog prolog attributes
    # @option prolog [String] :version version, typically '1.0' or '1.1'
    # @option prolog [String] :encoding encoding for the document, currently included but ignored
    # @option prolog [String] :standalone indicates the document is standalone
    def initialize(prolog={})
      super(nil)
      @attributes = { }
      @attributes[:version] = prolog[:version] unless prolog[:version].nil?
      @attributes[:encoding] = prolog[:encoding] unless prolog[:encoding].nil?
      @attributes[:standalone] = prolog[:standalone] unless prolog[:standalone].nil?
    end
    
  end # Document
end # Ox

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ox-1.3.2 lib/ox/document.rb
ox-1.3.1 lib/ox/document.rb
ox-1.3.0 lib/ox/document.rb
ox-1.2.15 lib/ox/document.rb
ox-1.2.14 lib/ox/document.rb
ox-1.2.13 lib/ox/document.rb
ox-1.2.12 lib/ox/document.rb
ox-1.2.11 lib/ox/document.rb
ox-1.2.10 lib/ox/document.rb
ox-1.2.9 lib/ox/document.rb
ox-1.2.8 lib/ox/document.rb
ox-1.2.7 lib/ox/document.rb
ox-1.2.6 lib/ox/document.rb