class OoxmlParser::SlideMasterFile

Class for parsing SlideMaster files

Attributes

common_slide_data[R]

@return [CommonSlideData] common slide data

Public Instance Methods

parse(file) click to toggle source

Parse SlideMaster @param file [String] path to file to parse @return [SlideMasterFile] result of parsing

# File lib/ooxml_parser/pptx_parser/presentation/slide_master_file.rb, line 12
def parse(file)
  root_object.add_to_xmls_stack(file.gsub(root_object.unpacked_folder, ''))
  doc = parse_xml(file)
  doc.xpath('p:sldMaster/*').each do |node_child|
    case node_child.name
    when 'cSld'
      @common_slide_data = CommonSlideData.new(parent: self).parse(node_child)
    end
  end
  root_object.xmls_stack.pop
  self
end