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 ⇒ String
Result of convert of object to string.
Methods inherited from OOXMLDocumentObject
#==, #boolean_attribute_value, #initialize, #parse_xml, #with_data?
Methods included from OoxmlObjectAttributeHelper
#attribute_enabled?, #option_enabled?
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.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb', line 7 def alpha_channel @alpha_channel end |
#file_reference ⇒ FileReference
Returns image structure.
9 10 11 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb', line 9 def file_reference @file_reference end |
#path_to_media_file ⇒ Object Also known as: path
Returns the value of attribute path_to_media_file.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb', line 7 def path_to_media_file @path_to_media_file end |
Instance Method Details
#parse(node) ⇒ DocxBlip
Parse DocxBlip object
21 22 23 24 25 26 27 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb', line 21 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 ⇒ String
Returns result of convert of object to string.
14 15 16 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb', line 14 def to_str path_to_media_file end |