Sha256: 65755398fe77edca167a59b40a421d87bb02bc5113f1aef888434f0ec4e0b529

Contents?: true

Size: 771 Bytes

Versions: 4

Compression:

Stored size: 771 Bytes

Contents

require_relative 'sound_action/sound'
module OoxmlParser
  # Class for parsing SoundAction
  class SoundAction < OOXMLDocumentObject
    attr_accessor :start_sound, :end_sound

    # Parse HyperlinkForHover
    # @param [Nokogiri::XML:Node] node with NumberingProperties
    # @return [HyperlinkForHover] result of parsing
    def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'stSnd'
          @start_sound = Sound.new(parent: self).parse(node_child.xpath('p:snd').first) unless node_child.xpath('p:snd').first.nil?
        when 'endSnd'
          @end_sound = Sound.new(parent: self).parse(node_child.xpath('p:snd').first) unless node_child.xpath('p:snd').first.nil?
        end
      end
      self
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ooxml_parser-0.4.1 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition/sound_action.rb
ooxml_parser-0.4.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition/sound_action.rb
ooxml_parser-0.3.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition/sound_action.rb
ooxml_parser-0.2.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition/sound_action.rb