Class: OpenXml::Docx::Properties::ComplexProperty

Inherits:
BaseProperty
  • Object
show all
Includes:
AttributeBuilder
Defined in:
lib/openxml/docx/properties/complex_property.rb

Constant Summary

Constants included from AttributeBuilder

AttributeBuilder::VALID_THEME_COLORS, AttributeBuilder::VALID_TYPES

Instance Attribute Summary

Attributes inherited from BaseProperty

#value

Instance Method Summary collapse

Methods included from AttributeBuilder

#attributes, included

Methods inherited from BaseProperty

#default_name, #default_namespace, #default_tag, #initialize, #name, name, namespace, #namespace, #tag, tag, tag_is_one_of

Constructor Details

This class inherits a constructor from OpenXml::Docx::Properties::BaseProperty

Instance Method Details

#render?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/openxml/docx/properties/complex_property.rb', line 12

def render?
  !xml_attributes.empty?
end

#to_xml(xml) ⇒ Object



7
8
9
10
# File 'lib/openxml/docx/properties/complex_property.rb', line 7

def to_xml(xml)
  return unless render?
  xml[namespace].public_send(tag, xml_attributes)
end