Sha256: f0bc365933fd3ad858446af0312b96ced03ce341efe1f8f814dc96c0b4694014

Contents?: true

Size: 816 Bytes

Versions: 40

Compression:

Stored size: 816 Bytes

Contents

# frozen_string_literal: true

require_relative 'transition/transition'
module OoxmlParser
  # Class for parsing `AlternateContent`
  class PresentationAlternateContent < OOXMLDocumentObject
    attr_accessor :transition, :timing, :elements

    def initialize(parent: nil)
      @elements = elements
      super
    end

    # Parse PresentationAlternateContent object
    # @param node [Nokogiri::XML:Element] node to parse
    # @return [PresentationAlternateContent] result of parsing
    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
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
ooxml_parser-0.21.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb
ooxml_parser-0.20.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb
ooxml_parser-0.19.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb
ooxml_parser-0.18.1 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb
ooxml_parser-0.18.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb
ooxml_parser-0.17.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb
ooxml_parser-0.16.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb
ooxml_parser-0.15.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb
ooxml_parser-0.14.2 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb
ooxml_parser-0.14.1-mingw32 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb
ooxml_parser-0.14.1 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb
ooxml_parser-0.14.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb
ooxml_parser-0.13.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb
ooxml_parser-0.12.2 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb
ooxml_parser-0.12.1 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb
ooxml_parser-0.12.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb
ooxml_parser-0.11.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb
ooxml_parser-0.10.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb
ooxml_parser-0.9.1 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb
ooxml_parser-0.9.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/presentation_alternate_content.rb