class OoxmlParser::PresentationAlternateContent
Class for parsing ‘AlternateContent`
Attributes
elements[RW]
timing[RW]
transition[RW]
Public Class Methods
new(parent: nil)
click to toggle source
Calls superclass method
OoxmlParser::OOXMLDocumentObject::new
# File lib/ooxml_parser/pptx_parser/presentation/slide/presentation_alternate_content.rb, line 9 def initialize(parent: nil) @elements = elements super end
Public Instance Methods
parse(node)
click to toggle source
Parse PresentationAlternateContent
object @param node [Nokogiri::XML:Element] node to parse @return [PresentationAlternateContent] result of parsing
# File lib/ooxml_parser/pptx_parser/presentation/slide/presentation_alternate_content.rb, line 17 def parse(node) node.xpath('mc:Choice/*', 'xmlns:mc' => 'http://schemas.openxmlformats.org/markup-compatibility/2006').each do |node_child| case node_child.name when 'transition' @transition = Transition.new(parent: self).parse(node_child) end end self end