Class: OpenXml::Docx::Parts::Settings
- Inherits:
-
Part
- Object
- Part
- OpenXml::Docx::Parts::Settings
- Defined in:
- lib/openxml/docx/parts/settings.rb
Instance Attribute Summary collapse
-
#settings ⇒ Object
readonly
Returns the value of attribute settings.
Instance Method Summary collapse
-
#initialize ⇒ Settings
constructor
A new instance of Settings.
- #to_xml ⇒ Object
Constructor Details
#initialize ⇒ Settings
Returns a new instance of Settings.
7 8 9 |
# File 'lib/openxml/docx/parts/settings.rb', line 7 def initialize @settings = [] end |
Instance Attribute Details
#settings ⇒ Object (readonly)
Returns the value of attribute settings.
5 6 7 |
# File 'lib/openxml/docx/parts/settings.rb', line 5 def settings @settings end |
Instance Method Details
#to_xml ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/openxml/docx/parts/settings.rb', line 11 def to_xml build_standalone_xml do |xml| xml.settings("xmlns:w" => "http://schemas.openxmlformats.org/wordprocessingml/2006/main") { xml.parent.namespace = xml.parent.namespace_definitions.find { |ns| ns.prefix == "w" } } end end |