Class: OoxmlParser::Sound
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::Sound
- Defined in:
- lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition/sound_action/sound.rb
Overview
Class for parsing ‘snd` tags
Instance Attribute Summary collapse
-
#file_reference ⇒ FileReference
Image structure.
-
#name ⇒ Object
Returns the value of attribute name.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#initialize(path = '', name = '', parent: nil) ⇒ Sound
constructor
A new instance of Sound.
-
#parse(node) ⇒ Sound
Parse Sound.
Methods inherited from OOXMLDocumentObject
#==, add_to_xmls_stack, copy_file_and_rename_to_zip, current_xml, dir, encrypted_file?, get_link_from_rels, unzip_file, #with_data?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
#initialize(path = '', name = '', parent: nil) ⇒ Sound
Returns a new instance of Sound.
8 9 10 11 12 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition/sound_action/sound.rb', line 8 def initialize(path = '', name = '', parent: nil) @path = path @name = name @parent = parent end |
Instance Attribute Details
#file_reference ⇒ FileReference
Returns image structure.
6 7 8 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition/sound_action/sound.rb', line 6 def file_reference @file_reference end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition/sound_action/sound.rb', line 4 def name @name end |
Instance Method Details
#parse(node) ⇒ Sound
Parse Sound
17 18 19 20 21 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition/sound_action/sound.rb', line 17 def parse(node) @file_reference = FileReference.new(parent: self).parse(node) @name = node.attribute('name').value self end |