Sha256: a7bd198223ab905fe7664d270f23bdb707f032401be521af6d6b3310219122a9

Contents?: true

Size: 764 Bytes

Versions: 24

Compression:

Stored size: 764 Bytes

Contents

# frozen_string_literal: true

module OoxmlParser
  # Class for parsing `snd` tags
  class Sound < OOXMLDocumentObject
    # @return [String] name of sound
    attr_reader :name
    # @return [FileReference] image structure
    attr_accessor :file_reference

    def initialize(path = '', name = '', parent: nil)
      @path = path
      @name = name
      super(parent: parent)
    end

    # Parse Sound
    # @param [Nokogiri::XML:Node] node with NumberingProperties
    # @return [Sound] result of parsing
    def parse(node)
      @file_reference = FileReference.new(parent: self).parse(node)
      node.attributes.each do |key, value|
        case key
        when 'name'
          @name = value.value.to_s
        end
      end
      self
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
ooxml_parser-0.21.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition/sound_action/sound.rb
ooxml_parser-0.20.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition/sound_action/sound.rb
ooxml_parser-0.19.0 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition/sound_action/sound.rb
ooxml_parser-0.18.1 lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition/sound_action/sound.rb