Module: Uniword::Docx::PackageDefaults Private

Included in:
Package
Defined in:
lib/uniword/docx/package_defaults.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Factory methods and defaults for DOCX package construction.

Extracted from Package for separation of responsibilities. Included in Package for backward compatibility.

Defined Under Namespace

Modules: ClassMethods

Constant Summary collapse

DOCUMENT_TO_PACKAGE_MAPPINGS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Mapping from DocumentRoot attributes to Package attributes. Only entries where names differ need explicit mapping.

{
  styles_configuration: :styles,
  settings: :settings,
  font_table: :font_table,
  web_settings: :web_settings,
  theme: :theme,
  core_properties: :core_properties,
  app_properties: :app_properties,
  custom_properties: :custom_properties,
  document_rels: :document_rels,
  theme_rels: :theme_rels,
  package_rels: :package_rels,
  content_types: :content_types,
  footnotes: :footnotes,
  endnotes: :endnotes,
}.freeze

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



31
32
33
34
35
# File 'lib/uniword/docx/package_defaults.rb', line 31

def self.included(base)
  base.extend(ClassMethods)
  base.const_set(:DOCUMENT_TO_PACKAGE_MAPPINGS,
                 DOCUMENT_TO_PACKAGE_MAPPINGS)
end