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
Constant Summary
Constants inherited from OOXMLDocumentObject
OOXMLDocumentObject::DEFAULT_DIRECTORY_FOR_MEDIA
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#path ⇒ Object
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(path = '', name = '') ⇒ Sound
constructor
A new instance of Sound.
Methods inherited from OOXMLDocumentObject
#==, add_to_xmls_stack, copy_file_and_rename_to_zip, copy_media_file, current_xml, dir, encrypted_file?, get_link_from_rels, media_folder, option_enabled?, unzip_file
Constructor Details
#initialize(path = '', name = '') ⇒ Sound
5 6 7 8 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition/sound_action/sound.rb', line 5 def initialize(path = '', name = '') @path = path @name = name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition/sound_action/sound.rb', line 3 def name @name end |
#path ⇒ Object
Returns the value of attribute path.
3 4 5 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition/sound_action/sound.rb', line 3 def path @path end |
Class Method Details
.parse(sound_node) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/ooxml_parser/pptx_parser/pptx_data/presentation/slide/transition/transition/sound_action/sound.rb', line 10 def self.parse(sound_node) sound = Sound.new sound.path = OOXMLDocumentObject.copy_media_file("#{OOXMLDocumentObject.root_subfolder}/#{get_link_from_rels(sound_node.attribute('embed').value).gsub('..', '')}") sound.name = sound_node.attribute('name').value sound end |