Sha256: 7bcdc2aa1c66a4178814682a39109dd228d16d44f3a4fb7272484029049fd688

Contents?: true

Size: 803 Bytes

Versions: 1

Compression:

Stored size: 803 Bytes

Contents

module OoxmlParser
  class AnimationEffect
    attr_accessor :transition, :filter, :behavior

    def initialize(behavior = nil)
      @behavior = behavior
    end

    def self.parse(animation_effect_node)
      animation_effect = AnimationEffect.new
      animation_effect.transition = animation_effect_node.attribute('transition').value if animation_effect_node.attribute('transition')
      animation_effect.filter = animation_effect_node.attribute('filter').value if animation_effect_node.attribute('filter')
      animation_effect_node.xpath('*').each do |animation_effect_node_child|
        case animation_effect_node_child.name
        when 'cBhvr'
          animation_effect.behavior = Behavior.parse(animation_effect_node_child)
        end
      end
      animation_effect
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ooxml_parser-0.1.2 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/slide/timing/animation_effect/animation_effect.rb