Sha256: 6e08382f81cee7271f4e13c559446cc0e973ab7a869d14c0e2294ff9c9dbc17d

Contents?: true

Size: 645 Bytes

Versions: 15

Compression:

Stored size: 645 Bytes

Contents

module Axlsx
  require 'axlsx/content_type/default.rb'
  require 'axlsx/content_type/override.rb'

  # ContentTypes used in the package. This is automatcially managed by the package package.
  class ContentType < SimpleTypedList
    
    def initialize
      super [Override, Default]
    end
    
    # Generates the xml document for [Content_Types].xml
    # @return [String] The document as a string.
    def to_xml()
      builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml|
        xml.Types(:xmlns => Axlsx::XML_NS_T) {
          each { |type| type.to_xml(xml) }
        }
      end
      builder.to_xml
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
axlsx-1.0.15 lib/axlsx/content_type/content_type.rb
axlsx-1.0.14 lib/axlsx/content_type/content_type.rb
axlsx-1.0.13 lib/axlsx/content_type/content_type.rb
axlsx-1.0.11 lib/axlsx/content_type/content_type.rb
axlsx-1.0.10 lib/axlsx/content_type/content_type.rb
axlsx-1.0.10a lib/axlsx/content_type/content_type.rb
axlsx-1.0.9 lib/axlsx/content_type/content_type.rb
axlsx-1.0.8 lib/axlsx/content_type/content_type.rb
axlsx-1.0.7 lib/axlsx/content_type/content_type.rb
axlsx-1.0.6 lib/axlsx/content_type/content_type.rb
axlsx-1.0.5 lib/axlsx/content_type/content_type.rb
axlsx-1.0.4 lib/axlsx/content_type/content_type.rb
axlsx-1.0.3 lib/axlsx/content_type/content_type.rb
axlsx-1.0.1 lib/axlsx/content_type/content_type.rb
axlsx-1.0.0 lib/axlsx/content_type/content_type.rb