class OpenXml::Docx::Elements::Level
Public Instance Methods
character_style()
click to toggle source
# File lib/openxml/docx/elements/level.rb, line 32 def character_style @character_style ||= Run.new end
paragraph_style()
click to toggle source
# File lib/openxml/docx/elements/level.rb, line 28 def paragraph_style @paragraph_style ||= Paragraph.new end
property_xml(xml)
click to toggle source
# File lib/openxml/docx/elements/level.rb, line 36 def property_xml(xml) props = properties.keys.map(&method(:send)).compact return if props.none?(&:render?) props.each { |prop| prop.to_xml(xml) } end
to_xml(xml)
click to toggle source
# File lib/openxml/docx/elements/level.rb, line 43 def to_xml(xml) xml["w"].public_send(tag, xml_attributes) { property_xml(xml) @paragraph_style.property_xml(xml) unless @paragraph_style.nil? @character_style.property_xml(xml) unless @character_style.nil? } end