class OoxmlParser::DocumentDefaults

Class for parsing ‘w:docDefaults` tags

Attributes

paragraph_properties_default[RW]

@return [RunPropertiesDefault] default properties of run

run_properties_default[RW]

@return [RunPropertiesDefault] default properties of run

Public Instance Methods

parse(node) click to toggle source

Parse Bookmark object @param node [Nokogiri::XML:Element] node to parse @return [Bookmark] result of parsing

# File lib/ooxml_parser/docx_parser/document_structure/styles/document_defaults.rb, line 16
def parse(node)
  node.xpath('*').each do |node_child|
    case node_child.name
    when 'rPrDefault'
      @run_properties_default = RunPropertiesDefault.new(parent: self).parse(node_child)
    when 'pPrDefault'
      @paragraph_properties_default = ParagraphPropertiesDefault.new(parent: self).parse(node_child)
    end
  end
  self
end