Class: Rocx::Parts::Settings

Inherits:
BasePart show all
Defined in:
lib/rocx/parts/settings.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BasePart

#build_standalone_xml, #build_xml, #read

Constructor Details

#initializeSettings

Returns a new instance of Settings.



6
7
8
# File 'lib/rocx/parts/settings.rb', line 6

def initialize
  @settings = []
end

Instance Attribute Details

#settingsObject (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_xmlObject



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