class OoxmlParser::NumberingProperties
Class for parsing `numPr` tags
Attributes
font[RW]
ilvl[RW]
numbering_properties[RW]
size[RW]
start_at[RW]
symbol[RW]
type[RW]
Public Class Methods
new(ilvl = 0, parent: nil)
click to toggle source
Calls superclass method
OoxmlParser::OOXMLDocumentObject::new
# File lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/numbering_properties.rb, line 8 def initialize(ilvl = 0, parent: nil) @ilvl = ilvl super(parent: parent) end
Public Instance Methods
abstruct_numbering()
click to toggle source
@return [AbstractNumbering] AbstractNumbering
of current properties
# File lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/numbering_properties.rb, line 14 def abstruct_numbering root_object.numbering.properties_by_num_id(@numbering_properties) end
numbering_level_current()
click to toggle source
@return [AbstractNumbering] level list of current numbering
# File lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/numbering_properties.rb, line 34 def numbering_level_current abstruct_numbering.level_list.each do |current_ilvl| return current_ilvl if current_ilvl.ilvl == @ilvl end nil end
parse(node)
click to toggle source
Parse NumberingProperties
@param [Nokogiri::XML:Node] node with NumberingProperties
@return [NumberingProperties] result of parsing
# File lib/ooxml_parser/common_parser/common_data/paragraph/paragrpah_properties/numbering_properties.rb, line 21 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'ilvl' @ilvl = node_child.attribute('val').value.to_i when 'numId' @numbering_properties = node_child.attribute('val').value.to_i end end self end