Class: OpenXml::Docx::Parts::Settings
- Inherits:
-
Part
- Object
- Part
- OpenXml::Docx::Parts::Settings
- Includes:
- RootNamespaces
- Defined in:
- lib/openxml/docx/parts/settings.rb
Constant Summary
Constants included from RootNamespaces
RootNamespaces::POSSIBLE_NAMESPACES
Instance Attribute Summary collapse
-
#settings ⇒ Object
readonly
Returns the value of attribute settings.
Instance Method Summary collapse
- #<<(child) ⇒ Object
-
#initialize ⇒ Settings
constructor
A new instance of Settings.
- #to_xml ⇒ Object
Methods included from RootNamespaces
Constructor Details
#initialize ⇒ Settings
Returns a new instance of Settings.
11 12 13 |
# File 'lib/openxml/docx/parts/settings.rb', line 11 def initialize @settings = [] end |
Instance Attribute Details
#settings ⇒ Object (readonly)
Returns the value of attribute settings.
9 10 11 |
# File 'lib/openxml/docx/parts/settings.rb', line 9 def settings @settings end |
Instance Method Details
#<<(child) ⇒ Object
15 16 17 |
# File 'lib/openxml/docx/parts/settings.rb', line 15 def <<(child) settings << child end |
#to_xml ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/openxml/docx/parts/settings.rb', line 19 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 |