Sha256: 782b94223766254003067284ee6c23797319649ed8ce47089f4f6cbab877b0b8

Contents?: true

Size: 570 Bytes

Versions: 13

Compression:

Stored size: 570 Bytes

Contents

module OpenXml
  module Docx
    module Parts
      class Settings < OpenXml::Part
        include RootNamespaces

        use_namespace :w

        attr_reader :settings

        def initialize
          @settings = []
        end

        def <<(child)
          settings << child
        end

        def to_xml
          build_standalone_xml do |xml|
            xml.settings(root_namespaces) {
              xml.parent.namespace = :w
              settings.each { |setting| setting.to_xml(xml) }
            }
          end
        end

      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
openxml-docx-0.11.5 lib/openxml/docx/parts/settings.rb
openxml-docx-0.11.4 lib/openxml/docx/parts/settings.rb
openxml-docx-0.11.3 lib/openxml/docx/parts/settings.rb
openxml-docx-0.11.2 lib/openxml/docx/parts/settings.rb
openxml-docx-0.11.1 lib/openxml/docx/parts/settings.rb
openxml-docx-0.11.0 lib/openxml/docx/parts/settings.rb
openxml-docx-0.11.0.rc lib/openxml/docx/parts/settings.rb
openxml-docx-0.10.6 lib/openxml/docx/parts/settings.rb
openxml-docx-0.10.5 lib/openxml/docx/parts/settings.rb
openxml-docx-0.10.4 lib/openxml/docx/parts/settings.rb
openxml-docx-0.10.3 lib/openxml/docx/parts/settings.rb
openxml-docx-0.10.2 lib/openxml/docx/parts/settings.rb
openxml-docx-0.10.1 lib/openxml/docx/parts/settings.rb