class OoxmlParser::NumberingLevel
This element specifies the appearance and behavior of a numbering level within a given abstract numbering
Attributes
@return [Integer] level id
@return [LevelJustification] justification of level
@return [NumberingFormat] numbering format data
@return [ParagraphProperties] properties of paragraph
@return [RunProperties] properties of run
@return [Start] start data
@return [Suffix] value of Suffix
@return [LevelText] level text
Public Class Methods
Source
# File lib/ooxml_parser/docx_parser/document_structure/numbering/abstract_numbering/numbering_level.rb, line 28 def initialize(parent: nil) @suffix = Suffix.new(parent: self) super end
Calls superclass method
OoxmlParser::OOXMLDocumentObject::new
Public Instance Methods
Source
# File lib/ooxml_parser/docx_parser/document_structure/numbering/abstract_numbering/numbering_level.rb, line 36 def parse(node) node.attributes.each do |key, value| case key when 'ilvl' @ilvl = value.value.to_f end end node.xpath('*').each do |num_level_child| case num_level_child.name when 'start' @start = ValuedChild.new(:integer, parent: self).parse(num_level_child) when 'numFmt' @numbering_format = NumberingFormat.new(parent: self).parse(num_level_child) when 'lvlText' @text = LevelText.new(parent: self).parse(num_level_child) when 'lvlJc' @justification = LevelJustification.new(parent: self).parse(num_level_child) when 'pPr' @paragraph_properties = ParagraphProperties.new(parent: self).parse(num_level_child) when 'rPr' @run_properties = RunProperties.new(parent: self).parse(num_level_child) when 'suff' @suffix = @suffix.parse(num_level_child) end end self end
Parse Numbering
Level data @param [Nokogiri::XML:Element] node with Numbering
Level data @return [NumberingLevel] value of Numbering
Level data