Class: Rocx::Parts::Settings
- Defined in:
- lib/rocx/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
Methods inherited from BasePart
#build_standalone_xml, #build_xml, #read
Constructor Details
#initialize ⇒ Settings
Returns a new instance of Settings.
6 7 8 |
# File 'lib/rocx/parts/settings.rb', line 6 def initialize @settings = [] end |
Instance Attribute Details
#settings ⇒ Object (readonly)
Returns the value of attribute settings.
4 5 6 |
# File 'lib/rocx/parts/settings.rb', line 4 def settings @settings end |
Instance Method Details
#to_xml ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/rocx/parts/settings.rb', line 10 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 |