Class: OpenXml::DrawingML::Parts::Theme

Inherits:
Part
  • Object
show all
Includes:
ContainsProperties
Defined in:
lib/openxml/drawingml/parts/theme.rb

Constant Summary collapse

NAMESPACE_DEFINITION =
{
  "xmlns:a" => "http://schemas.openxmlformats.org/drawingml/2006/main"
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTheme

Returns a new instance of Theme.



16
17
18
# File 'lib/openxml/drawingml/parts/theme.rb', line 16

def initialize
  @relationships = OpenXml::Parts::Rels.new
end

Instance Attribute Details

#relationshipsObject (readonly)

Returns the value of attribute relationships.



6
7
8
# File 'lib/openxml/drawingml/parts/theme.rb', line 6

def relationships
  @relationships
end

#theme_nameObject

Returns the value of attribute theme_name.



7
8
9
# File 'lib/openxml/drawingml/parts/theme.rb', line 7

def theme_name
  @theme_name
end

Instance Method Details

#to_xmlObject



25
26
27
28
29
30
31
# File 'lib/openxml/drawingml/parts/theme.rb', line 25

def to_xml
  build_standalone_xml do |xml|
    xml[:a].theme(NAMESPACE_DEFINITION.merge(xml_attributes)) do
      property_xml(xml)
    end
  end
end