Class: OoxmlParser::DocxBlip
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::DocxBlip
- Defined in:
- lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb
Overview
Class for parsing ‘blipFill`
Instance Attribute Summary collapse
-
#alpha_channel ⇒ Object
Returns the value of attribute alpha_channel.
-
#file_reference ⇒ FileReference
Image structure.
-
#path_to_media_file ⇒ Object
(also: #path)
Returns the value of attribute path_to_media_file.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ DocxBlip
Parse DocxBlip object.
- #to_str ⇒ Object
Methods inherited from OOXMLDocumentObject
#==, add_to_xmls_stack, copy_file_and_rename_to_zip, current_xml, dir, encrypted_file?, get_link_from_rels, #initialize, unzip_file, #with_data?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
This class inherits a constructor from OoxmlParser::OOXMLDocumentObject
Instance Attribute Details
#alpha_channel ⇒ Object
Returns the value of attribute alpha_channel.
5 6 7 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb', line 5 def alpha_channel @alpha_channel end |
#file_reference ⇒ FileReference
Returns image structure.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb', line 7 def file_reference @file_reference end |
#path_to_media_file ⇒ Object Also known as: path
Returns the value of attribute path_to_media_file.
5 6 7 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb', line 5 def path_to_media_file @path_to_media_file end |
Instance Method Details
#parse(node) ⇒ DocxBlip
Parse DocxBlip object
18 19 20 21 22 23 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb', line 18 def parse(node) blip_node = node.xpath('a:blip', 'xmlns:a' => 'http://schemas.openxmlformats.org/drawingml/2006/main').first return self if blip_node.nil? @file_reference = FileReference.new(parent: self).parse(blip_node) self end |
#to_str ⇒ Object
11 12 13 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb', line 11 def to_str path_to_media_file end |