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

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

Instance Attribute Summary

Attributes inherited from BaseProperty

#value

Instance Method Summary collapse

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)


14
15
16
# File 'lib/openxml/docx/properties/complex_property.rb', line 14

def render?
  !xml_attributes.empty?
end

#to_xml(xml) ⇒ Object



9
10
11
12
# File 'lib/openxml/docx/properties/complex_property.rb', line 9

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