Sha256: 844192b46e71c928ee89f01199b4a038cf0bf46d0dc0076c746d3ecee6906223

Contents?: true

Size: 1.12 KB

Versions: 48

Compression:

Stored size: 1.12 KB

Contents

# frozen_string_literal: true

require_relative 'transition_properties/wheel'
module OoxmlParser
  # Class for data for TransitionProperties
  class TransitionProperties < OOXMLDocumentObject
    attr_accessor :type, :through_black, :direction, :orientation, :spokes
    # @return [Wheel] Wheel Slide Transition
    attr_reader :wheel

    # Parse TransitionProperties object
    # @param node [Nokogiri::XML:Element] node to parse
    # @return [TransitionProperties] result of parsing
    def parse(node)
      @type = node.name.to_sym
      case node.name
      when 'blinds', 'checker', 'comb', 'cover', 'pull', 'push', 'randomBar', 'strips', 'wipe', 'zoom', 'warp'
        @direction = value_to_symbol(node.attribute('dir')) if node.attribute('dir')
      when 'cut', 'fade'
        @through_black = option_enabled?(node, 'thruBlk')
      when 'split'
        @direction = value_to_symbol(node.attribute('dir')) if node.attribute('dir')
        @orientation = node.attribute('orient').value.to_sym if node.attribute('orient')
      when 'wheel'
        @wheel = Wheel.new(parent: self).parse(node)
      end
      self
    end
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
ooxml_parser-0.37.1 lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb
ooxml_parser-0.37.0 lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb
ooxml_parser-0.36.1 lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb
ooxml_parser-0.36.0 lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb
ooxml_parser-0.35.0 lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb
ooxml_parser-0.34.2 lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb
ooxml_parser-0.34.1 lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb
ooxml_parser-0.34.0 lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb
ooxml_parser-0.33.0 lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb
ooxml_parser-0.32.0 lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb
ooxml_parser-0.31.0 lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb
ooxml_parser-0.30.0 lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb
ooxml_parser-0.29.0 lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb
ooxml_parser-0.28.0 lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb
ooxml_parser-0.27.0 lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb
ooxml_parser-0.26.0 lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb
ooxml_parser-0.25.0 lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb
ooxml_parser-0.24.0 lib/ooxml_parser/pptx_parser/presentation/slide/transition/transition_properties/transition_properties.rb
ooxml_parser-0.23.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition_properties/transition_properties.rb
ooxml_parser-0.22.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition_properties/transition_properties.rb